History log of /netbsd-current/sys/dev/pcmcia/pcmcia_cis.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.57 10-Nov-2019 chs

in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.


Revision tags: netbsd-9-base phil-wifi-20190609 isaki-audio2-base
# 1.56 03-Feb-2019 mrg

- add or adjust /* FALLTHROUGH */ where appropriate
- add __unreachable() after functions that can return but won't in
this case, and thus can't be marked __dead easily


Revision tags: netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 jdolecek-ncqfixes-base netbsd-7-2-RELEASE pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 netbsd-7-1-2-RELEASE pgoyette-compat-base netbsd-7-1-1-RELEASE tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 netbsd-7-1-RELEASE netbsd-7-1-RC2 nick-nhusb-base-20170204 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 nick-nhusb-base-20161204 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE nick-nhusb-base-20161004 localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 netbsd-7-0-1-RELEASE nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 netbsd-7-0-RELEASE nick-nhusb-base-20150921 netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE rmind-smpnet-nbase netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base rmind-uvmplock-nbase cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1 rmind-uvmplock-base yamt-nfs-mp-base9 uebayasi-xip-base matt-premerge-20091211 yamt-nfs-mp-base8 yamt-nfs-mp-base7 jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 jym-xensuspend-nbase jym-xensuspend-base
# 1.55 12-May-2009 cegger

branches: 1.55.64;
struct device * -> device_t, no functional changes intended.


Revision tags: yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 nick-hppapmap-base
# 1.54 15-Mar-2009 cegger

ansify function definitions


# 1.53 14-Mar-2009 dsl

Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base simonb-wapbl-nbase simonb-wapbl-base mjf-devfs2-base
# 1.52 03-Jul-2008 drochner

branches: 1.52.4; 1.52.10;
split device/softc
Now I'm through - all my devices are split.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base yamt-nfs-mp-base yamt-pf42-base
# 1.51 05-Apr-2008 cegger

branches: 1.51.4; 1.51.6; 1.51.8;
use aprint_*_dev and device_xname


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase nick-csl-alignment-base5 ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 matt-armv6-prevmlocking wrstuden-fixsa-base-1 vmlocking2-base3 netbsd-4-0-RELEASE bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 netbsd-4-0-RC5 matt-nb4-arm-base matt-armv6-nbase jmcneill-base netbsd-4-0-RC4 mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase yamt-x86pmap-base4 bouyer-xenamd64-base netbsd-4-0-RC3 yamt-x86pmap-base3 yamt-x86pmap-base2 netbsd-4-0-RC2 yamt-x86pmap-base netbsd-4-0-RC1 matt-armv6-base matt-mips64-base jmcneill-pm-base hpcarm-cleanup-base nick-csl-alignment-base yamt-idlelwp-base8 wrstuden-fixsa-base thorpej-atomic-base reinoud-bufcleanup-base mjf-ufs-trans-base vmlocking-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 newlock2-base netbsd-4-base
# 1.50 16-Nov-2006 christos

branches: 1.50.48;
__unused removal on arguments; approved by core.


Revision tags: yamt-splraiseipl-base2
# 1.49 12-Oct-2006 christos

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386


Revision tags: yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 rpaulo-netinet-merge-pcb-base
# 1.48 02-Sep-2006 christos

branches: 1.48.2; 1.48.4;
redo with c99 initializers


# 1.47 02-Sep-2006 christos

- comment out impossible comparison
- add missing initializer


Revision tags: abandoned-netbsd-4-base yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base yamt-pdpolicy-base4 elad-kernelauth-base simonb-timecounters-base
# 1.46 08-Apr-2006 christos

- wrap memspace {}, pointed out by rui.
- comment out the memspace none case, pointed out by rui.
- move declarations to the top to avoid brace mess.


# 1.45 08-Apr-2006 christos

Split the tuple parsing code in its own function for each kind, instead of
having a single parsing function that has more than 1000 lines of code.


# 1.44 08-Apr-2006 rpaulo

Back out rev 1.42 and 1.43. It's been causing much more hassle than it should
and I don't feel like continue arguing about it.


# 1.43 06-Apr-2006 rpaulo

Add misssing }. Sorry for breaking the build.


# 1.42 06-Apr-2006 rpaulo

In pcmcia_parse_cis_tuple(), refactor the memspace section introducing
a switch statement and fixing CID 566.


Revision tags: yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.41 23-Feb-2006 gdamore

branches: 1.41.2; 1.41.4; 1.41.6;
When unmapping and remapping, the mem handle and mem tags can change. Do
not assume that they will remain the same.


# 1.40 11-Dec-2005 christos

branches: 1.40.2; 1.40.4; 1.40.6;
merge ktrace-lwp.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 yamt-readahead-base3 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 yamt-readahead-base2 netbsd-3-0-RC2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base netbsd-3-0-RC1 yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base yamt-km-base4 yamt-km-base3 netbsd-3-base kent-audio2-base ktrace-lwp-base
# 1.39 27-Feb-2005 perry

branches: 1.39.4;
nuke trailing whitespace


Revision tags: yamt-km-base2
# 1.38 04-Feb-2005 perry

de-__P


Revision tags: yamt-km-base kent-audio1-beforemerge kent-audio1-base
# 1.37 15-Oct-2004 enami

branches: 1.37.4; 1.37.6;
Rewrite the loop without using useless SIMPLEQ_FOREACH macro.


# 1.36 17-Sep-2004 itojun

deal with PCMCIA_TPCE_IO_RANGE_ADDRSIZE_NONE and
PCMCIA_TPCE_IO_RANGE_LENGTHSIZE_NONE properly. enami
solves kern/26726.


# 1.35 10-Aug-2004 mycroft

Constify.


# 1.34 07-Aug-2004 mycroft

Swap around the output in some other cases so it's consistent.
Remove some more DELAY()s.


# 1.33 07-Aug-2004 mycroft

Only DELAY() once per CIS region, not once per tuple.
For PCMCIACISDEBUG, print out the tuple *before* parsing it or calling the
callback, so that we can see the tuple that the callback claimed.


Revision tags: netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.32 22-Oct-2003 mjl

Typo in comment. From OpenBSD.


Revision tags: nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base kqueue-aftermerge kqueue-beforemerge gehenna-devsw-base kqueue-base
# 1.31 15-Aug-2002 christos

branches: 1.31.6;
Fix multi-function card memory problems:
- centralize pcmcia function allocation and free'ing.
- free the cfe too, not just the pf in the multifunction card case.
- don't free pointers while walking the list, because free() will
fill the memory with deadbeef, thus killing list walking.


# 1.30 01-Jun-2002 lukem

SIMPLEQ rototill:
- implement SIMPLEQ_REMOVE(head, elm, type, field). whilst it's O(n),
this mirrors the functionality of SLIST_REMOVE() (the other
singly-linked list type) and FreeBSD's STAILQ_REMOVE()
- remove the unnecessary elm arg from SIMPLEQ_REMOVE_HEAD().
this mirrors the functionality of SLIST_REMOVE_HEAD() (the other
singly-linked list type) and FreeBSD's STAILQ_REMOVE_HEAD()
- remove notes about SIMPLEQ not supporting arbitrary element removal
- use SIMPLEQ_FOREACH() instead of home-grown for loops
- use SIMPLEQ_EMPTY() appropriately
- use SIMPLEQ_*() instead of accessing sqh_first,sqh_last,sqe_next directly
- reorder manual page; be consistent about how the types are listed
- other minor cleanups


Revision tags: netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base eeh-devprop-base newlock-base ifpoll-base
# 1.29 12-Jan-2002 tsutsui

branches: 1.29.8; 1.29.10;
Call malloc(9) with M_ZERO flag instead of memset() after malloc().


# 1.28 15-Nov-2001 lukem

don't need <sys/types.h> when including <sys/param.h>


# 1.27 13-Nov-2001 lukem

add RCSIDs


Revision tags: thorpej-mips-cache-base
# 1.26 25-Oct-2001 bouyer

Commit changes I posted to tech-kern on Oct 14, which makes the ethernet part
of my Xircom RealPort Ethernet 10/100 + Modem (REM56G) work.
The modem part is still not usable (this would need some PCMCIA magic that
I don't know how to do; see my message to tech-kern on Oct 07).
Change to pcmcia_cis.c from OpenBSD.
I checked that this doesn't break a 3com 3C562D (ethernet+modem) which I
also have.


Revision tags: thorpej-devvp-base3 thorpej-devvp-base2
# 1.25 24-Sep-2001 itohy

branches: 1.25.2;
Add simple boundary check on CIS parsing.
I have a weird PC-card-style appliance (I'm not sure I may call it a PC card)
whose ``CIS'' reads zeros forever, which caused kernel panic.

For your interest, it is a cooling fan to be inserted to a PC card slot.


Revision tags: post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base
# 1.24 07-Jul-2001 thorpej

branches: 1.24.2; 1.24.4;
bzero -> memset


# 1.23 13-May-2001 jmc

Turn off PCMCIACISDEBUG by default. This should get set with options in a config file


Revision tags: thorpej_scsipi_beforemerge thorpej_scsipi_nbase thorpej_scsipi_base
# 1.22 27-Mar-2001 toshii

Change place of tuple.{memt,memh} initialization.


# 1.21 10-Feb-2001 martin

branches: 1.21.2;
Stopgap fix for PR 9984: sprinkle some (small) delays at appropriate
places into the CIS reading code.

The card in question has IO8 only enabled in its CIS info and is apparently
not able to keep up with quick reads. It words fine in a pcmcia slot but
panics(!) the kernel in a TI 1250 cardbus slot. This may be a failure of
the pci cardbus code when initializing this bridge. When finding (and
fixing) that, we should back this change out.

The card I am testing with is not broken, I have multiple versions of it
(AVM Fritz! pcmcia ISDN card), all work fine on windows and all cause
us to panic because of bogus CIS info read.

XXX - panicing because of bogus CIS data is probably another error.


# 1.20 17-Oct-2000 haya

Add a cis decoding function which decodes some CISTPL_FUNCE tuples for
disk and network functions.


# 1.19 14-Jul-2000 jun

apply Kenji Aoyama <aoyama@nk.mcu.or.jp>'s patch
on port-hpcmips-ja@jp.netbsd.org Mon, 10 Jul 2000 21:21:47 +0900

FIX:
Can't read CIS tuple chain:some TDK CF Flash memory card.


Revision tags: netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base
# 1.18 21-Feb-2000 enami

branches: 1.18.4;
Cosmetic changes.


Revision tags: chs-ubc2-newbase
# 1.17 10-Feb-2000 chopps

map common memory 8 bit for cis scan when following longlinks.


# 1.16 25-Jan-2000 chopps

The cfe is initialized to the default entry, when a table entry value
is present don't OR in the flags with the defaults, replace them.


# 1.15 20-Jan-2000 enami

Don't overwrite cfe->flags.


# 1.14 14-Jan-2000 cgd

Some additional sanity checks to keep this code from bursting into
flame if presented with bad CIS data (e.g. because of a memory space
conflict):
* more sanity checking on LONGLINK_MFC CIS tuples (exact length check, sanity
check on size vs. size of array we allocated for them), to avoid various
missteps which could cause this code to complete trash the kernel stack.
* clear the entire contents of the state structure before processing, so
things like uninitted pointers will actually have a known value!
* be more careful with CISTPL_CFTABLE_ENTRY: check to see that the current
state's default_entry isn't NULL before dereferencing it.


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base fvdl-softdep-base
# 1.13 07-Nov-1999 enami

Print range of all iospaces or all memspaces if their length aren't zero.


Revision tags: comdex-fall-1999-base chs-ubc2-base
# 1.12 11-Jul-1999 bad

branches: 1.12.2; 1.12.4; 1.12.8;
In pcmcia_pars_cis_tuple(): in the PCMCIA_TPCE_FS_MEMSPACE_TABLE case
there is one more memspace in the table then the PCMCIA_TPCE_MS_COUNT
mask produces.


# 1.11 11-Jul-1999 bad

In pcmcia_print_cis(): When printing io and mem spaces don't append trailing
0s if length or hostaddr are zero, instead DTRT.


Revision tags: kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.10 29-Dec-1998 marc

branches: 1.10.2; 1.10.4;
check for end of tuple while reading cfe data


Revision tags: kenh-if-detach-base chs-ubc-base
# 1.9 22-Aug-1998 msaitoh

fix version string (from PC Card Standard, April 1998 (Release 6.1))


# 1.8 13-Aug-1998 nathanw

Use PCMCIA_FUNCTION definitions.
Initialize function ID in new pcmcia_function structures to
PCMCIA_FUNCTION_UNSPEC, not PCMCIA_FUNCTION_MULTIFUNCTION (0).


Revision tags: eeh-paddr_t-base
# 1.7 19-Jul-1998 christos

Add a devlist2h.awk so that we don't sprinkle the same constants over
each device driver file and use it.


# 1.6 01-Jul-1998 marc

better MFC parsing (for 3c56[23]D), and make sure the pf is zeroed out before using it (for adaptec 1460b)


# 1.5 29-May-1998 msaitoh

add some information from "PC Card standard March 1997"


# 1.4 09-Mar-1998 christos

- fix pcmcia_scan_cis to return:
-1 error
0 desired tuple not found
1 desired tuple found


Revision tags: netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base
# 1.3 19-Oct-1997 enami

Make `manufacturer' and `product' 32bit wide so that they can contain
both 16bit id values found in card CIS and special value to indicate
that no value found in CIS. Use that special value for the card that
doesn't have id values. Test that value in ne2000_match().


# 1.2 16-Oct-1997 thorpej

Pull marc-pcmcia branch down from trunk.


Revision tags: thorpej-signal-base marc-pcmcia-base
# 1.1 30-Jul-1997 marc

branches: 1.1.2;
file pcmcia_cis.c was initially added on branch marc-pcmcia.


Revision tags: isaki-audio2-base
# 1.56 03-Feb-2019 mrg

- add or adjust /* FALLTHROUGH */ where appropriate
- add __unreachable() after functions that can return but won't in
this case, and thus can't be marked __dead easily


Revision tags: pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 jdolecek-ncqfixes-base netbsd-7-2-RELEASE pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 netbsd-7-1-2-RELEASE pgoyette-compat-base netbsd-7-1-1-RELEASE tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 netbsd-7-1-RELEASE netbsd-7-1-RC2 nick-nhusb-base-20170204 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 nick-nhusb-base-20161204 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE nick-nhusb-base-20161004 localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 netbsd-7-0-1-RELEASE nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 netbsd-7-0-RELEASE nick-nhusb-base-20150921 netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE rmind-smpnet-nbase netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base rmind-uvmplock-nbase cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1 rmind-uvmplock-base yamt-nfs-mp-base9 uebayasi-xip-base matt-premerge-20091211 yamt-nfs-mp-base8 yamt-nfs-mp-base7 jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 jym-xensuspend-nbase jym-xensuspend-base
# 1.55 12-May-2009 cegger

struct device * -> device_t, no functional changes intended.


Revision tags: yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 nick-hppapmap-base
# 1.54 15-Mar-2009 cegger

ansify function definitions


# 1.53 14-Mar-2009 dsl

Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base simonb-wapbl-nbase simonb-wapbl-base mjf-devfs2-base
# 1.52 03-Jul-2008 drochner

branches: 1.52.4; 1.52.10;
split device/softc
Now I'm through - all my devices are split.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base yamt-nfs-mp-base yamt-pf42-base
# 1.51 05-Apr-2008 cegger

branches: 1.51.4; 1.51.6; 1.51.8;
use aprint_*_dev and device_xname


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase nick-csl-alignment-base5 ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 matt-armv6-prevmlocking wrstuden-fixsa-base-1 vmlocking2-base3 netbsd-4-0-RELEASE bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 netbsd-4-0-RC5 matt-nb4-arm-base matt-armv6-nbase jmcneill-base netbsd-4-0-RC4 mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase yamt-x86pmap-base4 bouyer-xenamd64-base netbsd-4-0-RC3 yamt-x86pmap-base3 yamt-x86pmap-base2 netbsd-4-0-RC2 yamt-x86pmap-base netbsd-4-0-RC1 matt-armv6-base matt-mips64-base jmcneill-pm-base hpcarm-cleanup-base nick-csl-alignment-base yamt-idlelwp-base8 wrstuden-fixsa-base thorpej-atomic-base reinoud-bufcleanup-base mjf-ufs-trans-base vmlocking-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 newlock2-base netbsd-4-base
# 1.50 16-Nov-2006 christos

branches: 1.50.48;
__unused removal on arguments; approved by core.


Revision tags: yamt-splraiseipl-base2
# 1.49 12-Oct-2006 christos

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386


Revision tags: yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 rpaulo-netinet-merge-pcb-base
# 1.48 02-Sep-2006 christos

branches: 1.48.2; 1.48.4;
redo with c99 initializers


# 1.47 02-Sep-2006 christos

- comment out impossible comparison
- add missing initializer


Revision tags: abandoned-netbsd-4-base yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base yamt-pdpolicy-base4 elad-kernelauth-base simonb-timecounters-base
# 1.46 08-Apr-2006 christos

- wrap memspace {}, pointed out by rui.
- comment out the memspace none case, pointed out by rui.
- move declarations to the top to avoid brace mess.


# 1.45 08-Apr-2006 christos

Split the tuple parsing code in its own function for each kind, instead of
having a single parsing function that has more than 1000 lines of code.


# 1.44 08-Apr-2006 rpaulo

Back out rev 1.42 and 1.43. It's been causing much more hassle than it should
and I don't feel like continue arguing about it.


# 1.43 06-Apr-2006 rpaulo

Add misssing }. Sorry for breaking the build.


# 1.42 06-Apr-2006 rpaulo

In pcmcia_parse_cis_tuple(), refactor the memspace section introducing
a switch statement and fixing CID 566.


Revision tags: yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.41 23-Feb-2006 gdamore

branches: 1.41.2; 1.41.4; 1.41.6;
When unmapping and remapping, the mem handle and mem tags can change. Do
not assume that they will remain the same.


# 1.40 11-Dec-2005 christos

branches: 1.40.2; 1.40.4; 1.40.6;
merge ktrace-lwp.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 yamt-readahead-base3 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 yamt-readahead-base2 netbsd-3-0-RC2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base netbsd-3-0-RC1 yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base yamt-km-base4 yamt-km-base3 netbsd-3-base kent-audio2-base ktrace-lwp-base
# 1.39 27-Feb-2005 perry

branches: 1.39.4;
nuke trailing whitespace


Revision tags: yamt-km-base2
# 1.38 04-Feb-2005 perry

de-__P


Revision tags: yamt-km-base kent-audio1-beforemerge kent-audio1-base
# 1.37 15-Oct-2004 enami

branches: 1.37.4; 1.37.6;
Rewrite the loop without using useless SIMPLEQ_FOREACH macro.


# 1.36 17-Sep-2004 itojun

deal with PCMCIA_TPCE_IO_RANGE_ADDRSIZE_NONE and
PCMCIA_TPCE_IO_RANGE_LENGTHSIZE_NONE properly. enami
solves kern/26726.


# 1.35 10-Aug-2004 mycroft

Constify.


# 1.34 07-Aug-2004 mycroft

Swap around the output in some other cases so it's consistent.
Remove some more DELAY()s.


# 1.33 07-Aug-2004 mycroft

Only DELAY() once per CIS region, not once per tuple.
For PCMCIACISDEBUG, print out the tuple *before* parsing it or calling the
callback, so that we can see the tuple that the callback claimed.


Revision tags: netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.32 22-Oct-2003 mjl

Typo in comment. From OpenBSD.


Revision tags: nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base kqueue-aftermerge kqueue-beforemerge gehenna-devsw-base kqueue-base
# 1.31 15-Aug-2002 christos

branches: 1.31.6;
Fix multi-function card memory problems:
- centralize pcmcia function allocation and free'ing.
- free the cfe too, not just the pf in the multifunction card case.
- don't free pointers while walking the list, because free() will
fill the memory with deadbeef, thus killing list walking.


# 1.30 01-Jun-2002 lukem

SIMPLEQ rototill:
- implement SIMPLEQ_REMOVE(head, elm, type, field). whilst it's O(n),
this mirrors the functionality of SLIST_REMOVE() (the other
singly-linked list type) and FreeBSD's STAILQ_REMOVE()
- remove the unnecessary elm arg from SIMPLEQ_REMOVE_HEAD().
this mirrors the functionality of SLIST_REMOVE_HEAD() (the other
singly-linked list type) and FreeBSD's STAILQ_REMOVE_HEAD()
- remove notes about SIMPLEQ not supporting arbitrary element removal
- use SIMPLEQ_FOREACH() instead of home-grown for loops
- use SIMPLEQ_EMPTY() appropriately
- use SIMPLEQ_*() instead of accessing sqh_first,sqh_last,sqe_next directly
- reorder manual page; be consistent about how the types are listed
- other minor cleanups


Revision tags: netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base eeh-devprop-base newlock-base ifpoll-base
# 1.29 12-Jan-2002 tsutsui

branches: 1.29.8; 1.29.10;
Call malloc(9) with M_ZERO flag instead of memset() after malloc().


# 1.28 15-Nov-2001 lukem

don't need <sys/types.h> when including <sys/param.h>


# 1.27 13-Nov-2001 lukem

add RCSIDs


Revision tags: thorpej-mips-cache-base
# 1.26 25-Oct-2001 bouyer

Commit changes I posted to tech-kern on Oct 14, which makes the ethernet part
of my Xircom RealPort Ethernet 10/100 + Modem (REM56G) work.
The modem part is still not usable (this would need some PCMCIA magic that
I don't know how to do; see my message to tech-kern on Oct 07).
Change to pcmcia_cis.c from OpenBSD.
I checked that this doesn't break a 3com 3C562D (ethernet+modem) which I
also have.


Revision tags: thorpej-devvp-base3 thorpej-devvp-base2
# 1.25 24-Sep-2001 itohy

branches: 1.25.2;
Add simple boundary check on CIS parsing.
I have a weird PC-card-style appliance (I'm not sure I may call it a PC card)
whose ``CIS'' reads zeros forever, which caused kernel panic.

For your interest, it is a cooling fan to be inserted to a PC card slot.


Revision tags: post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base
# 1.24 07-Jul-2001 thorpej

branches: 1.24.2; 1.24.4;
bzero -> memset


# 1.23 13-May-2001 jmc

Turn off PCMCIACISDEBUG by default. This should get set with options in a config file


Revision tags: thorpej_scsipi_beforemerge thorpej_scsipi_nbase thorpej_scsipi_base
# 1.22 27-Mar-2001 toshii

Change place of tuple.{memt,memh} initialization.


# 1.21 10-Feb-2001 martin

branches: 1.21.2;
Stopgap fix for PR 9984: sprinkle some (small) delays at appropriate
places into the CIS reading code.

The card in question has IO8 only enabled in its CIS info and is apparently
not able to keep up with quick reads. It words fine in a pcmcia slot but
panics(!) the kernel in a TI 1250 cardbus slot. This may be a failure of
the pci cardbus code when initializing this bridge. When finding (and
fixing) that, we should back this change out.

The card I am testing with is not broken, I have multiple versions of it
(AVM Fritz! pcmcia ISDN card), all work fine on windows and all cause
us to panic because of bogus CIS info read.

XXX - panicing because of bogus CIS data is probably another error.


# 1.20 17-Oct-2000 haya

Add a cis decoding function which decodes some CISTPL_FUNCE tuples for
disk and network functions.


# 1.19 14-Jul-2000 jun

apply Kenji Aoyama <aoyama@nk.mcu.or.jp>'s patch
on port-hpcmips-ja@jp.netbsd.org Mon, 10 Jul 2000 21:21:47 +0900

FIX:
Can't read CIS tuple chain:some TDK CF Flash memory card.


Revision tags: netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base
# 1.18 21-Feb-2000 enami

branches: 1.18.4;
Cosmetic changes.


Revision tags: chs-ubc2-newbase
# 1.17 10-Feb-2000 chopps

map common memory 8 bit for cis scan when following longlinks.


# 1.16 25-Jan-2000 chopps

The cfe is initialized to the default entry, when a table entry value
is present don't OR in the flags with the defaults, replace them.


# 1.15 20-Jan-2000 enami

Don't overwrite cfe->flags.


# 1.14 14-Jan-2000 cgd

Some additional sanity checks to keep this code from bursting into
flame if presented with bad CIS data (e.g. because of a memory space
conflict):
* more sanity checking on LONGLINK_MFC CIS tuples (exact length check, sanity
check on size vs. size of array we allocated for them), to avoid various
missteps which could cause this code to complete trash the kernel stack.
* clear the entire contents of the state structure before processing, so
things like uninitted pointers will actually have a known value!
* be more careful with CISTPL_CFTABLE_ENTRY: check to see that the current
state's default_entry isn't NULL before dereferencing it.


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base fvdl-softdep-base
# 1.13 07-Nov-1999 enami

Print range of all iospaces or all memspaces if their length aren't zero.


Revision tags: comdex-fall-1999-base chs-ubc2-base
# 1.12 11-Jul-1999 bad

branches: 1.12.2; 1.12.4; 1.12.8;
In pcmcia_pars_cis_tuple(): in the PCMCIA_TPCE_FS_MEMSPACE_TABLE case
there is one more memspace in the table then the PCMCIA_TPCE_MS_COUNT
mask produces.


# 1.11 11-Jul-1999 bad

In pcmcia_print_cis(): When printing io and mem spaces don't append trailing
0s if length or hostaddr are zero, instead DTRT.


Revision tags: kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.10 29-Dec-1998 marc

branches: 1.10.2; 1.10.4;
check for end of tuple while reading cfe data


Revision tags: kenh-if-detach-base chs-ubc-base
# 1.9 22-Aug-1998 msaitoh

fix version string (from PC Card Standard, April 1998 (Release 6.1))


# 1.8 13-Aug-1998 nathanw

Use PCMCIA_FUNCTION definitions.
Initialize function ID in new pcmcia_function structures to
PCMCIA_FUNCTION_UNSPEC, not PCMCIA_FUNCTION_MULTIFUNCTION (0).


Revision tags: eeh-paddr_t-base
# 1.7 19-Jul-1998 christos

Add a devlist2h.awk so that we don't sprinkle the same constants over
each device driver file and use it.


# 1.6 01-Jul-1998 marc

better MFC parsing (for 3c56[23]D), and make sure the pf is zeroed out before using it (for adaptec 1460b)


# 1.5 29-May-1998 msaitoh

add some information from "PC Card standard March 1997"


# 1.4 09-Mar-1998 christos

- fix pcmcia_scan_cis to return:
-1 error
0 desired tuple not found
1 desired tuple found


Revision tags: netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base
# 1.3 19-Oct-1997 enami

Make `manufacturer' and `product' 32bit wide so that they can contain
both 16bit id values found in card CIS and special value to indicate
that no value found in CIS. Use that special value for the card that
doesn't have id values. Test that value in ne2000_match().


# 1.2 16-Oct-1997 thorpej

Pull marc-pcmcia branch down from trunk.


Revision tags: thorpej-signal-base marc-pcmcia-base
# 1.1 30-Jul-1997 marc

branches: 1.1.2;
file pcmcia_cis.c was initially added on branch marc-pcmcia.