History log of /freebsd-11-stable/sys/dev/pccard/pccard.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 331722 29-Mar-2018 eadler

Revert r330897:

This was intended to be a non-functional change. It wasn't. The commit
message was thus wrong. In addition it broke arm, and merged crypto
related code.

Revert with prejudice.

This revert skips files touched in r316370 since that commit was since
MFCed. This revert also skips files that require $FreeBSD$ property
changes.

Thank you to those who helped me get out of this mess including but not
limited to gonzo, kevans, rgrimes.

Requested by: gjb (re)


# 330897 14-Mar-2018 eadler

Partial merge of the SPDX changes

These changes are incomplete but are making it difficult
to determine what other changes can/should be merged.

No objections from: pfg


# 315221 14-Mar-2017 pfg

MFC r313982, r314068:
sys: Replace zero with NULL for pointers.

Found with: devel/coccinelle


# 302408 07-Jul-2016 gjb

Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle.
Prune svn:mergeinfo from the new branch, as nothing has been merged
here.

Additional commits post-branch will follow.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


/freebsd-11-stable/MAINTAINERS
/freebsd-11-stable/cddl
/freebsd-11-stable/cddl/contrib/opensolaris
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/zfs
/freebsd-11-stable/cddl/contrib/opensolaris/lib/libzfs
/freebsd-11-stable/contrib/amd
/freebsd-11-stable/contrib/apr
/freebsd-11-stable/contrib/apr-util
/freebsd-11-stable/contrib/atf
/freebsd-11-stable/contrib/binutils
/freebsd-11-stable/contrib/bmake
/freebsd-11-stable/contrib/byacc
/freebsd-11-stable/contrib/bzip2
/freebsd-11-stable/contrib/com_err
/freebsd-11-stable/contrib/compiler-rt
/freebsd-11-stable/contrib/dialog
/freebsd-11-stable/contrib/dma
/freebsd-11-stable/contrib/dtc
/freebsd-11-stable/contrib/ee
/freebsd-11-stable/contrib/elftoolchain
/freebsd-11-stable/contrib/elftoolchain/ar
/freebsd-11-stable/contrib/elftoolchain/brandelf
/freebsd-11-stable/contrib/elftoolchain/elfdump
/freebsd-11-stable/contrib/expat
/freebsd-11-stable/contrib/file
/freebsd-11-stable/contrib/gcc
/freebsd-11-stable/contrib/gcclibs/libgomp
/freebsd-11-stable/contrib/gdb
/freebsd-11-stable/contrib/gdtoa
/freebsd-11-stable/contrib/groff
/freebsd-11-stable/contrib/ipfilter
/freebsd-11-stable/contrib/ldns
/freebsd-11-stable/contrib/ldns-host
/freebsd-11-stable/contrib/less
/freebsd-11-stable/contrib/libarchive
/freebsd-11-stable/contrib/libarchive/cpio
/freebsd-11-stable/contrib/libarchive/libarchive
/freebsd-11-stable/contrib/libarchive/libarchive_fe
/freebsd-11-stable/contrib/libarchive/tar
/freebsd-11-stable/contrib/libc++
/freebsd-11-stable/contrib/libc-vis
/freebsd-11-stable/contrib/libcxxrt
/freebsd-11-stable/contrib/libexecinfo
/freebsd-11-stable/contrib/libpcap
/freebsd-11-stable/contrib/libstdc++
/freebsd-11-stable/contrib/libucl
/freebsd-11-stable/contrib/libxo
/freebsd-11-stable/contrib/llvm
/freebsd-11-stable/contrib/llvm/projects/libunwind
/freebsd-11-stable/contrib/llvm/tools/clang
/freebsd-11-stable/contrib/llvm/tools/lldb
/freebsd-11-stable/contrib/llvm/tools/llvm-dwarfdump
/freebsd-11-stable/contrib/llvm/tools/llvm-lto
/freebsd-11-stable/contrib/mdocml
/freebsd-11-stable/contrib/mtree
/freebsd-11-stable/contrib/ncurses
/freebsd-11-stable/contrib/netcat
/freebsd-11-stable/contrib/ntp
/freebsd-11-stable/contrib/nvi
/freebsd-11-stable/contrib/one-true-awk
/freebsd-11-stable/contrib/openbsm
/freebsd-11-stable/contrib/openpam
/freebsd-11-stable/contrib/openresolv
/freebsd-11-stable/contrib/pf
/freebsd-11-stable/contrib/sendmail
/freebsd-11-stable/contrib/serf
/freebsd-11-stable/contrib/sqlite3
/freebsd-11-stable/contrib/subversion
/freebsd-11-stable/contrib/tcpdump
/freebsd-11-stable/contrib/tcsh
/freebsd-11-stable/contrib/tnftp
/freebsd-11-stable/contrib/top
/freebsd-11-stable/contrib/top/install-sh
/freebsd-11-stable/contrib/tzcode/stdtime
/freebsd-11-stable/contrib/tzcode/zic
/freebsd-11-stable/contrib/tzdata
/freebsd-11-stable/contrib/unbound
/freebsd-11-stable/contrib/vis
/freebsd-11-stable/contrib/wpa
/freebsd-11-stable/contrib/xz
/freebsd-11-stable/crypto/heimdal
/freebsd-11-stable/crypto/openssh
/freebsd-11-stable/crypto/openssl
/freebsd-11-stable/gnu/lib
/freebsd-11-stable/gnu/usr.bin/binutils
/freebsd-11-stable/gnu/usr.bin/cc/cc_tools
/freebsd-11-stable/gnu/usr.bin/gdb
/freebsd-11-stable/lib/libc/locale/ascii.c
/freebsd-11-stable/sys/cddl/contrib/opensolaris
/freebsd-11-stable/sys/contrib/dev/acpica
/freebsd-11-stable/sys/contrib/ipfilter
/freebsd-11-stable/sys/contrib/libfdt
/freebsd-11-stable/sys/contrib/octeon-sdk
/freebsd-11-stable/sys/contrib/x86emu
/freebsd-11-stable/sys/contrib/xz-embedded
/freebsd-11-stable/usr.sbin/bhyve/atkbdc.h
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.c
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.h
/freebsd-11-stable/usr.sbin/bhyve/console.c
/freebsd-11-stable/usr.sbin/bhyve/console.h
/freebsd-11-stable/usr.sbin/bhyve/pci_fbuf.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.h
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.c
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.h
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.c
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.h
/freebsd-11-stable/usr.sbin/bhyve/rfb.c
/freebsd-11-stable/usr.sbin/bhyve/rfb.h
/freebsd-11-stable/usr.sbin/bhyve/sockstream.c
/freebsd-11-stable/usr.sbin/bhyve/sockstream.h
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.c
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.h
/freebsd-11-stable/usr.sbin/bhyve/usb_mouse.c
/freebsd-11-stable/usr.sbin/bhyve/vga.c
/freebsd-11-stable/usr.sbin/bhyve/vga.h
# 297365 28-Mar-2016 imp

Move pccard_safe_quote() up to subr_bus.c and rename to
devctl_safe_quote() so it can be used more generally.


# 297000 17-Mar-2016 jhibbits

Use uintmax_t (typedef'd to rman_res_t type) for rman ranges.

On some architectures, u_long isn't large enough for resource definitions.
Particularly, powerpc and arm allow 36-bit (or larger) physical addresses, but
type `long' is only 32-bit. This extends rman's resources to uintmax_t. With
this change, any resource can feasibly be placed anywhere in physical memory
(within the constraints of the driver).

Why uintmax_t and not something machine dependent, or uint64_t? Though it's
possible for uintmax_t to grow, it's highly unlikely it will become 128-bit on
32-bit architectures. 64-bit architectures should have plenty of RAM to absorb
the increase on resource sizes if and when this occurs, and the number of
resources on memory-constrained systems should be sufficiently small as to not
pose a drastic overhead. That being said, uintmax_t was chosen for source
clarity. If it's specified as uint64_t, all printf()-like calls would either
need casts to uintmax_t, or be littered with PRI*64 macros. Casts to uintmax_t
aren't horrible, but it would also bake into the API for
resource_list_print_type() either a hidden assumption that entries get cast to
uintmax_t for printing, or these calls would need the PRI*64 macros. Since
source code is meant to be read more often than written, I chose the clearest
path of simply using uintmax_t.

Tested on a PowerPC p5020-based board, which places all device resources in
0xfxxxxxxxx, and has 8GB RAM.
Regression tested on qemu-system-i386
Regression tested on qemu-system-mips (malta profile)

Tested PAE and devinfo on virtualbox (live CD)

Special thanks to bz for his testing on ARM.

Reviewed By: bz, jhb (previous)
Relnotes: Yes
Sponsored by: Alex Perez/Inertial Computing
Differential Revision: https://reviews.freebsd.org/D4544


# 296336 03-Mar-2016 jhibbits

Replace all resource occurrences of '0UL/~0UL' with '0/~0'.

Summary:
The idea behind this is '~0ul' is well-defined, and casting to uintmax_t, on a
32-bit platform, will leave the upper 32 bits as 0. The maximum range of a
resource is 0xFFF.... (all bits of the full type set). By dropping the 'ul'
suffix, C type promotion rules apply, and the sign extension of ~0 on 32 bit
platforms gets it to a type-independent 'unsigned max'.

Reviewed By: cem
Sponsored by: Alex Perez/Inertial Computing
Differential Revision: https://reviews.freebsd.org/D5255


# 296137 27-Feb-2016 jhibbits

Migrate many bus_alloc_resource() calls to bus_alloc_resource_anywhere().

Most calls to bus_alloc_resource() use "anywhere" as the range, with a given
count. Migrate these to use the new bus_alloc_resource_anywhere() API.

Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D5370


# 295832 19-Feb-2016 jhibbits

Introduce a RMAN_IS_DEFAULT_RANGE() macro, and use it.

This simplifies checking for default resource range for bus_alloc_resource(),
and improves readability.

This is part of, and related to, the migration of rman_res_t from u_long to
uintmax_t.

Discussed with: jhb
Suggested by: marcel


# 294883 27-Jan-2016 jhibbits

Convert rman to use rman_res_t instead of u_long

Summary:
Migrate to using the semi-opaque type rman_res_t to specify rman resources. For
now, this is still compatible with u_long.

This is step one in migrating rman to use uintmax_t for resources instead of
u_long.

Going forward, this could feasibly be used to specify architecture-specific
definitions of resource ranges, rather than baking a specific integer type into
the API.

This change has been broken out to facilitate MFC'ing drivers back to 10 without
breaking ABI.

Reviewed By: jhb
Sponsored by: Alex Perez/Inertial Computing
Differential Revision: https://reviews.freebsd.org/D5075


# 267992 28-Jun-2014 hselasky

Pull in r267961 and r267973 again. Fix for issues reported will follow.


# 267985 27-Jun-2014 gjb

Revert r267961, r267973:

These changes prevent sysctl(8) from returning proper output,
such as:

1) no output from sysctl(8)
2) erroneously returning ENOMEM with tools like truss(1)
or uname(1)
truss: can not get etype: Cannot allocate memory


# 267961 27-Jun-2014 hselasky

Extend the meaning of the CTLFLAG_TUN flag to automatically check if
there is an environment variable which shall initialize the SYSCTL
during early boot. This works for all SYSCTL types both statically and
dynamically created ones, except for the SYSCTL NODE type and SYSCTLs
which belong to VNETs. A new flag, CTLFLAG_NOFETCH, has been added to
be used in the case a tunable sysctl has a custom initialisation
function allowing the sysctl to still be marked as a tunable. The
kernel SYSCTL API is mostly the same, with a few exceptions for some
special operations like iterating childrens of a static/extern SYSCTL
node. This operation should probably be made into a factored out
common macro, hence some device drivers use this. The reason for
changing the SYSCTL API was the need for a SYSCTL parent OID pointer
and not only the SYSCTL parent OID list pointer in order to quickly
generate the sysctl path. The motivation behind this patch is to avoid
parameter loading cludges inside the OFED driver subsystem. Instead of
adding special code to the OFED driver subsystem to post-load tunables
into dynamically created sysctls, we generalize this in the kernel.

Other changes:
- Corrected a possibly incorrect sysctl name from "hw.cbb.intr_mask"
to "hw.pcic.intr_mask".
- Removed redundant TUNABLE statements throughout the kernel.
- Some minor code rewrites in connection to removing not needed
TUNABLE statements.
- Added a missing SYSCTL_DECL().
- Wrapped two very long lines.
- Avoid malloc()/free() inside sysctl string handling, in case it is
called to initialize a sysctl from a tunable, hence malloc()/free() is
not ready when sysctls from the sysctl dataset are registered.
- Bumped FreeBSD version to indicate SYSCTL API change.

MFC after: 2 weeks
Sponsored by: Mellanox Technologies


# 237692 28-Jun-2012 imp

Simplify resource activation a bit.


# 227309 07-Nov-2011 ed

Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.

The SYSCTL_NODE macro defines a list that stores all child-elements of
that node. If there's no SYSCTL_DECL macro anywhere else, there's no
reason why it shouldn't be static.


# 222764 06-Jun-2011 imp

Make a couple of debug printfs DEVPRINTF.


# 189318 03-Mar-2009 imp

Add in parsing of the disk FUNCE tuples.


# 188212 05-Feb-2009 wkoszek

Bring consistent debugging output for all values that are supposed
to be printed in a hexadecimal format. Otherwise, '270' doesn't say
much.

Reviewed by: imp


# 188179 05-Feb-2009 imp

Fix parameter types for set_res_flags and read_ivars


# 181395 07-Aug-2008 imp

Fix a small problem in the comment about departure from NetBSD.
Also, r181392 fixed a small problem with multifunction cards that would
cause the card not to power down when the last driver detached from it.


# 181392 07-Aug-2008 imp

Add NEC PC-9802N-J02 (confirmed) and NEC PC-9202N-J02R (speculative)
to the list of devices.


# 181342 06-Aug-2008 imp

Unify the initial card probe/attach procedure with the kldload
procedure. There were some subtle differences before that could lead
to a variety of bugs, including resources being lost (in one case
forever). pccard_probe_and_attach_card does this now, and includes
comments about what's going on and why, since it isn't obvious from
the code. Please let me know if I've missed anything...

Provide a new function called pccard_select_cfe that allows drivers to
select which configuration entry to use. This is needed for some
older pre-MFC standard cards with many functions that want to activate
all their functions by selecting alternative entries, or to work
around broken ones. pccard_select_cfe will migrate into the
pccard_if.m interface as its interface stabilizes to keep all the
pccard drivers from referencing any symbols in the pccard.ko module
directly.

Fix a printf to refer to the right function name.


# 170849 16-Jun-2007 imp

only register a ithread handler if the card requests an ithread
handler.


# 170163 31-May-2007 piso

Make the interrupt handler wrapper capable of correctly support filter+ithread handler.

Discussed and reviewed with: bsdimp, simokawa


# 166901 23-Feb-2007 piso

o break newbus api: add a new argument of type driver_filter_t to
bus_setup_intr()

o add an int return code to all fast handlers

o retire INTR_FAST/IH_FAST

For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current

Reviewed by: many
Approved by: re@


# 166453 03-Feb-2007 imp

We need to free the ivars for the child that we just deleted.


# 158086 27-Apr-2006 imp

When pccard_safe_quote is passed NULL for src, it shouldn't panic.

Someone sent me this a while ago, but I can't find who to give them
proper credit...


# 153773 28-Dec-2005 imp

Add some sanity checking to the pccard insertion case. Whine if the
bridge tries to tell us about a new card when we have one already in
the socket.


# 150468 22-Sep-2005 imp

Remove compat layer for OLDCARD compatibility. All instances of it
are now gone from the tree.


# 150391 20-Sep-2005 imp

remove some dead code


# 150362 20-Sep-2005 imp

Implement /dev/pccardN.cis. This mirrors the CIS for the card to userland.

pccardc dumpcis /dev/pccardN.cis will work now, but I may rewrite pccardc.

Also, move more of the private data to a new file called pccardvarp.h.


# 150098 13-Sep-2005 imp

Add a few new functions interfaces to allow reading/writing attribute
memory, the CCR and a tweak to cis_scan.


# 150097 13-Sep-2005 imp

Define and use PCCARD_MEM_PAGE_SIZE.


# 148019 14-Jul-2005 imp

Insert missing int i;


# 148012 14-Jul-2005 imp

Also provide the function type in the nomatch routine.


# 147963 13-Jul-2005 imp

o Check to make sure the card has a function (panic if not) in read_ivar.
o Use pf more consistantly for pccard_function.
o Make sure we quote the strings properly (maybe this function belongs in
subr_bus.c)
o Tweak a comment to be more accurate after code changed.


# 147711 01-Jul-2005 imp

Add a much-requested feature: The ability for pccard attachments to
scan the CIS for interesting tuples. 95% of what can be obtained from
the CIS is harvested by the pccard layer and presented to the user in
standard function calls. However, there are special needs at times
where the standard stuff doesn't suffice. This is for those special
cases.

CARD_SCAN_CIS(device_get_parent(dev), function, argp)
scans the CIS of the card, passing each tuple to function with
the tuple and argp as its arguments. Returning 0 continues the scan,
while returning 1 terminates the scan. The value of the last
invocation of function is returned from this function.

int (*pccard_scan_t)(struct pccard_tuple *tuple, void *argp)
function called for each tuple. Elements of the CIS tuple can be
read with pccard_tuple_read_{1,2,3,4,n}(). You are reading
the actual tuple memory each time, in case your card has
registers in the CIS.

# I suppose these things should be documented in pccard(4) or something like
# that.

# I plan on unifying cardbus CIS support in a similar way.

Approved by: re (scottl)


# 144955 12-Apr-2005 imp

Big cleanup of resource code for pccard. Once coventry noticed
problems here, it became clear we were being too complex.

o Don't keep track of resources in two places
o Use resource_list_purge instead of rolling our own
o Just reassign the ownership of the resource, rather than freeing it
and reallocating it.
o Fix compile problems when sizeof(u_long) != sizeof(int)


# 144930 12-Apr-2005 imp

Cleanup of resource allocation code after having my attention focused on
this code:
o rid is stored in the resource, so don't bother keeping track of it here.
o Implement memory space
o Don't try to activate 'memory card' CFEs. This is type memory, as opposed
to the memory resource.


# 144927 12-Apr-2005 imp

Use return value of resource_list_add to avoid a second
resource_list_find. Check to make sure that rle is not NULL and panic
if it is (but it appears that resource_list_add already panics, so I'm
not entirely sure it is necessary now).

Add a test to make sure we have a interrupt resource when we're
disabling it. This is also a cannot happen, but the extra care
shoudln't hurt.

Found by: Coventry tool via sam@


# 143815 18-Mar-2005 imp

Need to initialize the resource list that we keep for our children.
STAILQ's require this, while it is optional for SLIST (well, as long
as the memory is bzeroed).

Noticed by: phk's crash


# 143785 18-Mar-2005 imp

Use STAILQ in preference to SLIST for the resources. Insert new resources
last in the list rather than first.

This makes the resouces print in the 4.x order rather than the 5.x order
(eg fdc0 at 0x3f0-0x3f5,0x3f7 is 4.x, but 0x3f7,0x3f0-0x3f5 is 5.x). This
also means that the pci code will once again print the resources in BAR
ascending order.


# 141959 15-Feb-2005 imp

Add an XXX comment about string quoting.


# 140693 24-Jan-2005 imp

Ignore the expected function number.

NetBSD went this route a while ago. FreeBSD originally tried this to
cope with multifunction cards. However, it turns out that we're
better off not worrying about the function number, and instead worry
about the function type for the function. This has worked well in
NetBSD, and all FreeBSD's relevant drivers have been converted.

# I'll rework the macros that specify them shortly, as soon as I can
# come up with a good, compatible way to deal...


# 140692 24-Jan-2005 imp

u_intXX_t -> uintXX_t


# 140488 19-Jan-2005 imp

Fix spelling error

submitted by: Anders Hanssen


# 140366 17-Jan-2005 imp

Go ahead and match on CIS3 and CIS4 strings as well. These are NULL
for the vast majority of our cards. However, they are critically
needed to distinguish different fe based PC Cards (the FMV-182 from
the 182A) which need to be treated differently (the ethernet address
is loaded not from the standard CIS-based ethernet tuples, but from
differing locations in attribute space based on the version string in
CIS3. This should have no impact for other users of this function.


# 139749 05-Jan-2005 imp

Start each of the license/copyright comments with /*-, minor shuffle of lines


# 133865 16-Aug-2004 imp

Some cards don't have the info entries in the CIS, so vendorstr and/or
prodstr may be NULL when fetched. For the default device description,
guard against this and return the numeric IDs instead when this
happens. For the matching routines, and consider NULL to not match
those entries that aren't NULL w/o calling strcmp.

Early patches by: Anders Hanssen


# 127135 17-Mar-2004 njl

Convert callers to the new bus_alloc_resource_any(9) API.

Submitted by: Mark Santcroos <marks@ripe.net>
Reviewed by: imp, dfr, bde


# 122032 04-Nov-2003 imp

Use %#jx for both args.

Non-use of %# mocked by: bde


# 121987 03-Nov-2003 imp

Fix two small style nits pointed out by bde: Remove spaces after cast and
indent continued line 4 spaces instead of 2.


# 121958 03-Nov-2003 imp

o Use %j and uintmax_t rather than uint64_t for casting.
o use more proper bus_size_t for iosize rather than bus_addr_t.

Noticed by: bde


# 121920 02-Nov-2003 imp

ia64 tenderbox hates what I did wrt a printf, so cast the snot out of
it and hope for the best.


# 121905 02-Nov-2003 imp

MFp4:
o Fix MFC cards. We were bogusly setting CCR_IOBASE[01] and CCR_IOLIMIT.
now when we activate the resource, we adjust these for MFC cards, per the
spec.
o Change type of pf_mfc_* to be bus_addr_t, which is more correct than
long.

This makes my 3C362D/3C363D and 3CXEM556 cards work! Woo Hoo!


# 121521 25-Oct-2003 imp

Const poison string accessor functions.


# 120868 07-Oct-2003 imp

o move the cis tuple definitions into a common file.
o minor optimization of cardbus_cis processing. Remove a bunch of generic
entries that are handled by generic.
o no longer need the card_get_type stuff.


# 119755 05-Sep-2003 imp

Whacked out CIS configurations can cause us to not have any child. When
such a card is ejected, we'd panic. Instead, just ignore it.

I should also add a sanity check in the FUNCID code as well, but this
isn't wrong since the check is cheap and happens infrequently.


# 119462 25-Aug-2003 imp

Probe routines can return < 0 for speculative matches. In the
compatibility routine, go ahead and accept that as 'success'. A
properly written compatible driver should return < 0 for both the
compat match and compat probe routines, so this will wind up doing the
right thing.


# 119418 24-Aug-2003 obrien

Use __FBSDID().
Also some minor style cleanups.


# 119162 20-Aug-2003 imp

pc98pcic isn't the name of the media driver. tcic likely will never
happen (unless someone sends one to me). Kill bogus module depend
that I commented out over a year ago.


# 116311 13-Jun-2003 imp

Add a comment about the MPSAFEness of this pccard_intr handler. Given
how we registered pccard_intr, it is MPSAFE. However, since we
register the pccard_intr handler with the flags of the ISR we call,
that is the gating factor. We need do nothing specific here.

Prompted by: seeing pccard_intr in a panic.


# 113313 10-Apr-2003 imp

In [bsd-nomads:16650] shibagaki-san presented an example product id of
0 in a problem that is being discussed. That means that the test for
product != 0 may cause problems. Looking at pccarddevs (which i
should have done earlier) we see:

product BONDWELL B236 0x0000 Game Card Joystick
product CONTEC CNETPC 0x0000 Contec C-NET(PC)C
product IBM MICRODRIVE 0x0000 IBM Microdrive
product RAYTHEON WLAN 0x0000 WLAN Adapter
product SOCKET EA_ETHER 0x0000 Socket Communications EA
product TDK LAK_CD011WL 0x0000 TDK LAK-CD011WL

so use only the vendor field for the end sentinel.


# 113307 09-Apr-2003 imp

1.77 was bogus: there is no logic bug. Back it out and compare the
correct fields instead.


# 113306 09-Apr-2003 jhb

Fix a logic bug in previous commit (use || rather than &&). In order to
terminate the loop only when both the name and vendor are zero, we should
keep looping so long as either one is not zero.


# 113300 09-Apr-2003 imp

Make sure that both pp_name and pp_vendor are zero to know we're at the
end of the list now that some valid entries don't have pp_name set. Also,
don't print a warning if pp->name is NULL and it is a total wildcard.


# 113242 08-Apr-2003 imp

MFP4:
o don't access struct resource members directly.
o Set a default device description based on the CIS name.


# 113078 04-Apr-2003 sanpei

fix typo


# 112359 18-Mar-2003 imp

Use %jd and a cast to intmax_t instead of a cast to long.
Minor style nit while I'm here.


# 111119 19-Feb-2003 imp

Back out M_* changes, per decision of the TRB.

Approved by: trb


# 109623 21-Jan-2003 alfred

Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.


# 106914 14-Nov-2002 mux

Fix printf() format errors.

Reviewed by: imp


# 106896 14-Nov-2002 imp

Remove an impossible condition. pf->dev is always non-null here.


# 106362 02-Nov-2002 imp

MFp4:
o Always release the resources on device detach.
o Attach resources the same with driver added as we do we do in the insert
case (maybe this should be a routine).
o signal the wakeup of the thread on resume instead of trying to force an
interrupt.
o Minor debug hacks.
o use 0xffffffff instead of -1 for uint32_t items.
o Don't complain when we're asked to detach no cards. This is normal.
o Eliminate the now worthless second parameter to card_detach_card.
o minor style(9)isms

Some of these patches may be from: iwasaki-san, jhb, iadowse


# 104641 07-Oct-2002 imp

o Add a nomatch routine so we whine when we don't know what to attach to
the card.
o Add comments about how we're doing the CIS activation.
o Add location and pnp info functions.
o Add better code to hopefully deal with ata cards better (and other drivers
that allocate resources that we didn't preallocate from the CIS). OLDCARD
used to allow it, but NEWCARD was pickier. I'm not 100% sure this works,
but it doesn't break anything.


# 104610 07-Oct-2002 imp

MFp4:
o Return the right string for CIS4_STR
o kill obsolete comment about not doing something that we now do.


# 103171 10-Sep-2002 imp

o Dike out the bogus reprobe stuff. It was getting in the way of newbus' own
reprobe code working. This bogusness was thrust upon me.
o Don't delete the device if no drivers attach. I had thrust this bogusness
upon others.

These two changes make kldload of a pccard driver work again.


# 102923 04-Sep-2002 imp

More in the continuing saga of phk vs his strange serial card.

In this installment, we learn that it is bad to access registers that
are only defined for mfc cards in the interrupt handler when we do not
in fact have a mfc card. For MFC cards, we'll only call the ISR if
the this card interrupted bit is set. For non mfc cards (which are
basically 90% of pccards in use), we always call the ISR and avoid
touching the suspect registers. We always pacify the bit in the MFC
case on the off chance that will help in the itnerrupt handler not
being registed.


# 102896 03-Sep-2002 phk

Drop another cookie to wet Warners appetite:

We need to call the drivers interrupt function even though the card is not
multifunction.


# 102713 31-Aug-2002 imp

Make modems work:

Don't set the CCR_OPTION register when registering/deregistering
interrupts unless the card is a MFC card. This makes a lot of cards
work that didn't work before. These bits are only defined for MFC
cards.

Remove COOKIE_FOR_WARNER kludges that phk introduced.

Add more debug info.

Annoy the purists by committing two minor style nits at the same time.

Many thanks to phk. He tracked this problem down to what was screwing
things up, so fixing it became trivially easy once the problem was
understood.


# 102704 31-Aug-2002 phk

Different and more correct workaround for broken cards under NEWCARD:
don't spam the configuration index register.

I'm not sure where those bits truly belong, but spamming the config
index sure doesn't do us any good.


# 102702 31-Aug-2002 phk

Ignore all config entries which have a non-zero start I/O address.

This is a bandaid which makes some more PCCards work under NEWCARD
which would otherwise not work.

Cards with only fixed address windows still loose.


# 101905 15-Aug-2002 imp

pccbb -> cbb


# 101762 12-Aug-2002 imp

Don't redundantly include \n in panic messages


# 97613 30-May-2002 takawata

Make oldcard and newcard kernel module work.


# 91786 07-Mar-2002 imp

Make hw.pccard.debug and hw.pccard.cis_debug tunable/sysctl. Setting to 1
will enable more verbose debugging output from the pccard system.


# 90964 20-Feb-2002 shiba

Add u_int16 prodext value in CISTPL_MANF_ID. This gets a fifth byte
when manufacturer id tuple length is 5. This change is for xe driver.
This is a dirty hack. But there is no better idea.

Reviewd by: imp


# 90897 19-Feb-2002 imp

o Count the number of mem and io spaces we allocate. If none work, bail out
o Add some better debugging code.
o Minor style(9) fixes.


# 90454 10-Feb-2002 imp

Null interrupt handlers should be OK, so if we don't have a function,
just return.


# 90445 10-Feb-2002 imp

o Use bus_generic_setup_intr instead of bus_setup_intr.
o Call bus_generic_setup_intr and check its return value. Don't setup
func until we successfully get the interrupt from our parent.
o Add comments about some maybe questionable stuff so I can check later
to make sure that it really is that way.


# 90436 09-Feb-2002 imp

Boot verbosify printing the CIS, since we don't normally need to do that.


# 90187 04-Feb-2002 imp

Default debugging to OFF now.


# 87975 15-Dec-2001 imp

Add support for suspending/resuming CardBus bridges.

We really should have and use power state information, but none exists
today.

Submitted by: YAMAMOTO Shigeru-san <shigeru@iij.ad.jp>


# 86907 26-Nov-2001 imp

Only call pccard_function_disable when we have a configured config
entry. Otherwise we panic on boot for cards that we can't allocate a
config entry for (my 3.3V wavelan card currently fails thusly).


# 86642 20-Nov-2001 imp

Weed out those pccard entries that match everything. These are too
dangerous to allow :-)

This should fix the ed1: <PLANEX ... bug.


# 82781 02-Sep-2001 shiba

Update cis tuple parser, add a pccarddevs entry,
and improve PCCARD_IVAR_ETHADDR in pccard_read_ivar().

Change points:

(1) Read Function Ext tuple.
(2) Add Ratoc REX-R280 entry(fe driver).
(3) Take ether address from function ext tuple.

Reviewed by: imp
Obtained from: NetBSD


# 82415 27-Aug-2001 jon

Make pccard_product_lookup non-static again...

When something is exported, do not mark it as static for no apparent reason...

Broken by: me


# 82383 26-Aug-2001 imp

More notes to the reader about issues in pccard code here.


# 82382 26-Aug-2001 imp

Merge notes, but not code, from my latest tree on pccard_function_init and pccard_function_free


# 82378 26-Aug-2001 jon

Part two of this NEWCARD update:

Briefly, the significant changes include:
* Way better resource management in pccbb, pccard and cardbus.
* pccard hot-removal now appears to work.
* support pre-fetchable memory in cardbus.
* update cardbus to support new pci bus interface functions.
* Fix CIS reading to no longer use rman_get_virtual().

What's not there, but in the works:
* pccard needs to do interrupt properly and not read the ISR on single
function cards.
* real resource management for pccard
* a complete implementation of CIS parsing
* need to look into how to correctly use mutex in pccbb


# 76424 10-May-2001 imp

Fix the panics for real this time. When something can't be allocated,
we need to delete the info from the list as well as zero out the res
pointer we saved in the code.

Also made a few style(9) changes while I was at it. Don't use if
(ptr) or if (!ptr), but compare against NULL. Compare against NULL
rather than 0. Don't have useless blocks.

There are likely other problems as well, but at least the wi based
wireless card with memory listed in its cis doesn't panic the system
when the card is inserted.


# 75761 21-Apr-2001 imp

Add accessor/ivar for the "function". This is so we can generically
match disks and serial ports and maybe others.


# 75756 21-Apr-2001 imp

Only try to delete the resource if we actually got it.


# 74636 22-Mar-2001 imp

First step towards making loadable modules independent of having
pccard in the kernel for those drivers with pccard attachments. This
makes the compat layer a little larger by introducing some inlines,
but should almost make it possible to have independent attachments.
The pccard_match function are the only one left, which I will take
care of shortly.


# 74632 22-Mar-2001 imp

Style(9) changes:
put parens around return (statements);
Use ANSI funcitons only.


# 72012 04-Feb-2001 phk

Another round of the <sys/queue.h> FOREACH transmogriffer.

Created with: sed(1)
Reviewed by: md5(1)


# 71322 21-Jan-2001 imp

Convert the vendor/product cis strings to an array of CIS entries. This
allows us to use the PCCARD_CIS #defines generated to distinguish cards
that don't have a Manufacturer and OEM.


# 70766 07-Jan-2001 peter

This is a bandaid for a problem that is not entirely fixed yet.

The pccard_function_init() call creates a bunch of inactive resources
that are persistant and configured on demand. When the child driver
"allocates" a resource it is connected up to one of these. When the
child releases the resource, we should not delete our copy, just
deactivate it again. Otherwise there is nothing to recreate it again
after several probe functions have run and done an alloc/release cycle.
INVARIANTS shows 0xdeadc0de without this.

More work is needed to do a sweep though the pccard_function_disable()
call to actually delete the resources for real. Right now, we leak
memory on eject (at best), so Dont Do That(TM) yet. This affects
16 bit pccards on a cardbus bridge only. This will be fixed soon, but
for now it gets the cards working.

Reviewed by: imp


# 70762 07-Jan-2001 imp

This file follows style(9), so adjust various nits in the last few commits
to conform to style(9), plus one other convention that I use:
o Declare variables at the start of the function, rather than in blocks
when it doesn't help understanding (mine).
o 80 column limit.
o BSD style statement continuation, rather than "gnu" style.


# 70761 07-Jan-2001 imp

For bus_setup_intr, cookiep is a pointer to storage for the parent
bus to use. We need to set it here.

This fixes the problem where a probe routine establishes and
disestablishes the interrupt and then we get a panic in the probe
routine.

However, we pass the pointer to the interrupt hanlder count to the
parent bus, which writes its own cookie there, so there may be some
problems with that which isn't apparent at the moment.

Commit made from: laptop running NEWCARD with sn driver (which works,
but gets the wrong ethernet address).


# 70748 07-Jan-2001 imp

o Now that I've had time to test the new interface, reintegrate it back in.
o Fix OLDCARD to use the new interface.
o Rename the offsetp argument to deltap to more closely reflect what it
is returning (it returns the delta from the requested value to the actual
value).
o Remove duplicate $FreeBSD$ in pccbb.c
o Allow deltap to be NULL.
o Convert new isa pcic driver and add XXX comments that this function isn't
actually implemented there (which means that NEWCARD pccard stuff won't
work there until it is).
o Revert attempts to make old inferface work in NEWCARD.

Subitted by: peter (Parts of the new version code)


# 70746 07-Jan-2001 imp

Undo the interface change to CARD_GET_MEMORY_OFFSET. It wasn't tested
by even a compile of the OLDCARD code, was unapproved by me the keeper
of OLDCARD and broke OLDCARD and the ray driver.

Adjust new code to cope with the older interface.

If the interface changes in the future, it ***MUST*** be cleared by me
so that the OLDCARD impacts taken into account. It code in card_if.m
is used jointly by both OLDCARD and NEWCARD.


# 70715 06-Jan-2001 jon

* Better kld support in pccbb/cardbus
- pccbb no longer needs to remember whether a card is inserted.
- pccbb reissues insertion on load of cardbus/pccard modules.
- got rid of unnecessary delays in power functions.
- Cardbus children are no longer deleted if probe/attach fails.
- non-attached child devices are reprobed at driver_added.

* CARD interface to read CIS
- added card_cis_read/card_cis_free interface to read arbitrary CIS
data. This currently is only implemented in cardbus.

* pccard begins to work
- pccard can now use higher memory space (and uses it by default).
- set_memory_offset interface changed.
- fixed ccr access, which was broken at multiple locations.
- implement an interrupt handler - pccard can now share interrupts.
- resource alloc/release/activate/deactivate functions gutted: some
resources are allocated by the bridge before the child device is
probed or attached. Thus the resource "belongs" to the bridge, and
the pccard_*_resource functions need to fudge the owner/rid.
- changed some error conditions to panics to speed debugging.

* Mutex fix - Giant is entered at the beginning of thread


# 67897 29-Oct-2000 dwmalone

Make a few more mallocs use M_ZERO.

Submitted by: josh@zipperup.org
Submitted by: Robert Drehmel <robd@gmx.net>
Approved by: imp


# 67424 22-Oct-2000 imp

o Remove lots of kludges with iospace and irq.
o Make sure that I/O space is aligned properly based on the length of the
resource we're allocating.
o Add bootverbose message when we fail.


# 67399 20-Oct-2000 imp

Get the interrupt correct.


# 67333 19-Oct-2000 imp

o Fix memory leak in ivars
o Change name of bus
o Change the panic on resource allocation failure to just a message. We'll
work out why this fails later in the pcic/pccbb code merge.


# 67269 18-Oct-2000 imp

o Remove a boatload of debugging printfs.
o Report function number and config index on probe line
o Activate the resources (I hope) when RF_ACTIVE is set on those resources
I'm allocating on behalf of my children.
o Always enable interrupts on multifunction cards in the multifunction
register.


# 67242 17-Oct-2000 imp

More NEWCARD fixes. We now almost properly print the probe message.
o Remember the resources we allocate for the config entry.
o When we get the resource, do an resource_list_add and do a
resource_list_delete if we fail later in the resource list.
o In the pccard bus, we allocate the resources. When a child asks for
them, just return the resources that we allocated (thanks to Paul
Richards and Mike Smith for the idea).


# 67187 16-Oct-2000 imp

First cut at allocating the resources from the CIS after the probe, but
before the attach. Things aren't completely working, but this is a good
checkpoint.

Also, initialize the dev member of the function as soon as we add it
to the parent.


# 67167 15-Oct-2000 imp

Lots of little fixes. We no longer panic on card insert:
o initialize ivars with bzero.
o remove interrupt function pointer. netbsd needs it, but we don't.
o add lots of comments about bogus things that I've been kludging to try
to make the simple cases work.
o add new ivar accessor for cis4 to match cis3. likely neither will be
needed, but it doesn't hurt to have it.


# 66847 09-Oct-2000 imp

o Record the pccard_function in the ivar.
o Use a macro function to get the ivar for the child rather than the casting
directly. This should be a little safer and easier to read.


# 66779 07-Oct-2000 imp

o Implement get_ivars so matching routines will work (this causes
compat probe routines to work).
o Have a null driver_added routines. We need to be careful about probing
until after we know we have a card. For the moment, we do nothing
(which is safe). This fixes a panic when a driver is loaded w/o a
card in the slot.

XXX still need to fix the resource list code. It is totally busted and
XXX causes a panic in the child printing routine after the probe has
XXX succeeded.


# 66200 21-Sep-2000 imp

o Merge in changes to the NetBSD sources:
pcmciavar.h 1.9->1.12
1.12, enami, minor coding nits
1.11, augustss, (pcmcia_devinfo NRFB)
1.10, cgd, add generic lookup routines
pcmcia.c 1.14->1.23
1.23, drochner, (probe code printing, NRFB)
1.22, augustss, KNF
1.21, uch, (hpcmips tweaks NRFB)
1.20, chopps, remove bogus debug
1.19, enami, minor coding nits
1.18, augustss, (pcmcia_devinfo NRFB)
1.17, nathanw, LP64 printf fixes
1.16, cgd, add generic lookup routines
1.15, aymeric, printf fixes
NRFB == not relevant to freebsd
o Expand the pccard matching routines to include the ability to match
against the CIS strings since our current driver database is based on
that.
o Add lots more ivars to get the information necessary to snag these values.


# 66058 19-Sep-2000 imp

Implement indirection in the pccard probe/attach. This should make it
possible to have different probe/attach semantics between the two
systems and yet still use the same driver for both.

Compatibility methods for OLDCARD drivers. We use these routines to make
it possible to call the OLDCARD driver's probe routine in the context that
it expects. For OLDCARD these are implemented as pass throughs to the
device_{probe,attach} routines. For NEWCARD they are implemented such
such that probe becomes strictly a matching routine and attach does both
the old probe and old attach.

compat devices should use the following:

/* Device interface */
DEVMETHOD(device_probe), pccard_compat_probe),
DEVMETHOD(device_attach), pccard_compat_attach),
/* Card interface */
DEVMETHOD(card_compat_match, foo_match), /* newly written */
DEVMETHOD(card_compat_probe, foo_probe), /* old probe */
DEVMETHOD(card_compat_attach, foo_attach), /* old attach */

This will allow a single driver binary image to be used for both
OLDCARD and NEWCARD.

Drivers wishing to not retain OLDCARD compatibility needn't do this.

ep driver minorly updated.

sn driver updated more than minorly. Add module dependencies to allow
module to load. Also change name to if_sn. Add some debugging code.
attempt to fix the cannot allocate memory problem I'd been seeing.
Minor formatting nits.


# 65917 16-Sep-2000 imp

Change the interface to pccard_function_init. The interface is such
that it looks for an acceptible one. Once it finds it, it should set
the resources for the device. I say "should" because I've not written
that. Also set an ivar for the child of pccard. Minor fix to the
attach message printed, we lose the slot number, which I'll have to
restore later. Adjust the pccard ivar so that we can save the
function that corresponds to this driver so we can enable and disable
it more easily. Save a pointer to the function so we know what we're
dealing with.

There should be some way for the driver to specify which cfg it wants
to activate. For now the pccard_function_init function just picks
one, but we'll have to revisit this going forward. I'm not doing it
now because I'd need some way to activate the card many times and I'm
not sure that is desirable or even safe with some cards.


# 65098 25-Aug-2000 imp

Minor tweaks to have the card be properly enabled via the CCR.
Minor debug changes
Minor power management pessimizations


# 64927 22-Aug-2000 imp

Save a pointer to the dev, if any, that each function attach.
Remove some bogus printfs.


# 64850 19-Aug-2000 imp

o Move to using PCCARD_SOFTC(dev)
o fill in the size of the actual softc, rather than 1 in data structure
o minor debugging improvements.


# 61788 18-Jun-2000 imp

Matching commits to pccard for last pcic changes. We now at least to
probe/attach. This is a checkpoint.


# 59389 19-Apr-2000 imp

OK. Next step: we read in CIS.

I've done this by having requests to allocate memory propigate up the
tree. We'll see how well this works and reevaluate if it isn't
working well. Also initialize ptr in the tuple. As well as minor
reorg of memory allocation. Likely need to do similar things for I/O
when the time comes.

I've move all defines from pccardchip.h into pccardvar.h and
eliminated pccardchip.h.


# 59193 13-Apr-2000 imp

checkpoint latest pccard/pcic hacking:

o Eliminate cross calls between the devices. Instead move to using the
newbus messaging system. Added three new card calls: attach_card,
detach_card, get_type.
o Eliminate interrupt routine in pccard we never use.
o Move from deactivate to detach for removing cards.
o Start mapping CIS memory, but it is broken and causes panics. At least
it is closer to working than before.
o Eliminate struct device everywhere. It was bogus.
o Initialize softc for pccard device so we have valid pointers to
ourselves.
o Implement routine to find the pcic ivar for a child device of the pccard so
we can use it to talk to the pcic hardware.
o Lots of minor tiding up.

This version now panics when we try to read the CIS. The next batch
of work to make this work is what was outlined in my posting to mobile
about resource allocation and such.


# 58581 26-Mar-2000 imp

Minor changes to some of the interfaces.
Remove RF_PCCARD_ATTR in anticipation of removing it from sys/rman.h
Add interface for setting "attributes" of pccard/cardbus devices.
Minor formatting nits.


# 55720 10-Jan-2000 imp

Eliminate pccard_chip_* tonight.
o ifdef out pccardchip.h (almost all of it, there are dangling bits
o Add rid/res members to pccard_function
o remove pct/pch from pccard_softc
o map memory properly in scan_cis (almost, see XXX for more work)
o manage ccr.
o remove bogus comment I added about touching the ccr being a layering
violation for pccard. It is properly done at that level.
o More function prototyping


# 55500 06-Jan-2000 imp

Checkpoint of today's changes. We now get to the point where the pccard
layer is trying to access the now unexistant chip functions.
o Added DEVPRINTF which is like DPRINTF only calls device_printf.
o Made it possible to define PCICDEBUG
o Remove ph_parent and use the softc pointer sc instead in pcic_handle.
o Remove all references to dv_xname
o Add some debug messages.
o enable MI attach/detach calling for pccard.
o convert pcic_chip_socket_{en,dis}able to pcic_{dis,en}able_socket
and connect them to the power_{enable,disbale}_socket.
o Remove pccard pointer from pcic_softc.
o GC some unused pccard functions.
o Convert pccard_chip_socket* to POWER_ENABLE_SOCKET
o kill pccard_attach_args.
o power_if.m updates. More to come.


# 55325 03-Jan-2000 imp

Connect interrupts and start processing them. We panic on card removal
now, but we're getting interrupts!
o Add pcic_suspend/pcic_resume so we can detach our children on suspention
and fix the state of the pcic on resume.
o Remove some unused parts of softc.
o Centralize resource activation/deactivation for pcic bridge chip in
the stylistic pcic_activate/pcic_deactivate.
o Add bus_print_child method so we can see the pccard attachment.
o Add pcic_identify in an attempt to make it possible to automatically id
the pcic devices. This works great, but we cannot divine the irq to use
from this method, nor the memory hole. For the moment, KLUDGE irq to be
10 and memory hold to be 0xd0000.
o Loose the pnp probe stuff. This may be a big mistake, but it is easy
enough to add back later. I did this so the identify routines can do their
thing unmolested by pnp information. The whole identify thing may be a bad
idea to be ripped out later.
o change return type of pcic_intr to void, make it static and ripple
this through the code.
o Add explicit call to bus_generic_attach at the end of pcic_attach to
get any children probed/attached.
o add some comments about future directions/questionable things being
done at different layers, etc.


# 54250 07-Dec-1999 imp

Tonight's cleanups.
o Implement memory and I/O activation/deactivation. irq not handled.
o switch pcic_chip functions around to use more convenient types.
o kill __P and most of the old K&R prototypes just to be mean.
o minor other nits


# 54073 03-Dec-1999 mdodd

Remove the 'ivars' arguement to device_add_child() and
device_add_child_ordered(). 'ivars' may now be set using the
device_set_ivars() function.

This makes it easier for us to change how arbitrary data structures are
associated with a device_t. Eventually we won't be modifying device_t
to add additional pointers for ivars, softc data etc.

Despite my best efforts I've probably forgotten something so let me know
if this breaks anything. I've been running with this change for months
and its been quite involved actually isolating all the changes from
the rest of the local changes in my tree.

Reviewed by: peter, dfr


# 53873 29-Nov-1999 imp

Flesh out the pccard bus_ methods with either the generic one (where
it would work), or a specialized one. Most of these have been
creatively stolen from pccard_nkb, which in turn stole from isa
showing that generic bus_ versions of bus_{set,get,delete}_resource
might be profitable.

Fix a couple of minor bugs introduced in the last round of updates
from NetBSD.

Start on the pccard_ivar structure which will hold the resources and
slot number.

Add tcic as a possible attachment for pccard and rename the attachment
for pcicx to pcic since the name has changed since I originally wrote
this stuff.

Next up:
stringing together the various memory and I/O
allocation/mapping primitives in i82365.c, final touches on the isa
attach routine and other fun stuff in that line of attach.


# 53813 28-Nov-1999 imp

Update pccard code to latest NetBSD code. This is the last merge
before newbusification hits full steam ahead.

All:
Adjust NetBSD labels to reflect new base versions.
dev/pcic/i82365.c:
1.24 Interface change for kernel threads
1.25 Massive unification for cardbus
dev/pcic/i82365var.h
1.8 Massive unification for cardbus
dev/pcic/i82365_isasubr.c
1.3 Massive unification for cardbus
dev/pccard/pccard_cis.c
1.11 Massive unification for cardbus
(better device printing, better memspace calcs)
dev/pccard/pccard_cis_quirks.c
1.4,1.5 Lotsa 3com devices
dev/pccard/pccardchip.h
1.4 Massive unification for cardbus
dev/pccard/pccarddevs
1.33..1.59 Lots of devices


# 52506 26-Oct-1999 imp

Moderately hacked pccard code from newconfig. It is somewhat in
incomplete and likely has problem. The code was originally pcmcia,
but I renamed it to pccard and made it compile on FreeBSD -current. I
converted SIMPLEQ to STAILQ as well as a few sc->dev.xname ->
device_printf changes. This is a green port of fairly mature code.

I derived this work from the FreeBSD newconfig project
(http://www.jp.freebsd.org/newconfig). Any problems with it are
likely introduced by me.

Obtained from: newconfig project