Commit Graph

444 Commits

Author SHA1 Message Date
Warner Losh
a355badbad Mempage should be 1024 not 4096. This fixes the multiple 16-bit cards
failing to work in, eg, Soekris boxes.

This is a critcal fix for 6.0.

MFC After: ASAP
2005-10-16 03:58:06 +00:00
Warner Losh
9f973790d2 Change I-O data WB-B11/CFZ entry to ELSA XI330 as the former is a
rebadged version of the latter.
2005-10-14 15:07:13 +00:00
Warner Losh
6d89d89383 IDs for generic card, airvast wm_100, i-o data wn-b11/cfz
Some of these may have been obtained from OpenBSD...
2005-10-11 01:05:39 +00:00
Warner Losh
f8a935ff17 Remove OLDCARD vestiges from here 2005-09-25 01:39:04 +00:00
Warner Losh
50acd0b852 Fix comment 2005-09-25 01:38:02 +00:00
Warner Losh
52fb9ab35e Remove unnecessary Dlink de650 entry 2005-09-24 17:32:57 +00:00
Warner Losh
6242d774d9 Remove compat layer for OLDCARD compatibility. All instances of it
are now gone from the tree.
2005-09-22 14:51:11 +00:00
Warner Losh
44dbf79b0c Better descriptions for the Jack of Diamonds cards. 2005-09-21 23:57:26 +00:00
Warner Losh
209161a4f6 Don't confuse the tuple code and the tuple length. Ooops. Since most
CIS are tiny, this likely hasn't bit anybody yet...
2005-09-21 20:08:24 +00:00
Warner Losh
3896edc1d9 Use the correct minor number for the pccardX.cis device.
Don't destroy a NULL device.

This should fix the panics on boot people are seeing on systems with
more than one pccard slot.
2005-09-20 23:48:06 +00:00
Warner Losh
255e4915dc remove some dead code 2005-09-20 19:34:10 +00:00
Gleb Smirnoff
90951c859b Fix build. 2005-09-20 10:25:51 +00:00
Warner Losh
73cac3387f 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.
2005-09-20 06:47:33 +00:00
Warner Losh
88750dc361 Call the passed function on cis scanning for all nodes in the CIS
chains, not just the 'real' ones.
2005-09-20 06:45:38 +00:00
Warner Losh
fe364ce963 Add a few new functions interfaces to allow reading/writing attribute
memory, the CCR and a tweak to cis_scan.
2005-09-13 17:56:36 +00:00
Warner Losh
395fee2331 Define and use PCCARD_MEM_PAGE_SIZE. 2005-09-13 17:49:47 +00:00
Warner Losh
8d4f90a457 MFp4: Remove stale functions. 2005-09-13 17:41:48 +00:00
Warner Losh
1376a07bcf MFp4:
Reduce the size of ed a little by removing some CIS based entries (others
likely can be removed too):
o The D-Link DFE-670TXD doesn't need its own entry based on strings.
o The Xircom CompactCard appears to be a TDK design, so list it there by ID
  and remove the strings.

Increase the size of ed a little:
o Add support for the Addtron AE-660CT and Addtron AE-660.  This is a very
  generic NE-2000 clone (so generic that its CIS tags say NE-2000 generic
  card!).
2005-09-10 00:17:55 +00:00
Warner Losh
8d5d6a36cd Sorting the belly button lint of history:
o Note that the first 255 locations are reserved for JEDEC Ids from
	  publication 106 (current revision Q, each one verified with
	  JEDEC and the PMCICA).
	o Move ADAPTEC2 to the right section.
	o Sort TOSHIBA2 numerically.
2005-09-07 22:13:31 +00:00
Warner Losh
2401a67b34 Update for a few recently discovered Olicom token ring cards:
OC3231 Token Ring + 28.8 modem
	OC3232 Token Ring + 33.6 modem
2005-08-31 17:00:48 +00:00
Warner Losh
1e1bef8615 Global Village appears to be using 0x018c as its vendor ID, but this
doesn't appear in the official lists, so make a note of that.
2005-08-29 05:46:05 +00:00
Warner Losh
991e00dffb o Add Toshiba's id. Make AGERE an alias for LUCENT. Add Ungermann's ID.
o Add Agere Hermes II and II.5 PC Cards (from zipit web page), TDK
  GlobalNetworker 3410 (from dmesg for my card) and another alternate
  PANASONIC KXLC0005_2 (from pcmcia-cs id lists).
2005-07-18 21:47:38 +00:00
Warner Losh
6b4a5b0b88 I believe that this tsleep was placed here in 1.28 to try to solve the
problems we were having properly mapping the CIS attr space on some
cards.  Those problems have been solved other ways, so this kludge is
no longer necessary.  Remove it and have pccards come up a whole
second faster.
2005-07-17 20:16:22 +00:00
Warner Losh
faf98cda63 Insert missing int i; 2005-07-15 01:43:08 +00:00
Warner Losh
2bb5d7f9ac Also provide the function type in the nomatch routine. 2005-07-14 20:40:42 +00:00
Takanori Watanabe
46fbc82b2b Add device id for RATOC REX CFU1 sl811 based USB Host Controller. 2005-07-14 14:53:38 +00:00
Warner Losh
e6e34c5689 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.
2005-07-13 15:00:59 +00:00
Warner Losh
c8d6e442b8 The supposed OLD STYLE network MAC id tuple was really just a buggy
expression in the card in question.  Since that driver uses a
different mechanism, retire the workaround for this bug.
2005-07-13 14:59:06 +00:00
Warner Losh
29dc053bc7 Add a couple of other products, tweak a few descriptions. 2005-07-13 14:50:47 +00:00
Warner Losh
ba8f34770d Add a boatload of new device ids, gleaned from the pcmcia-cs-3.2.8
distribution.  Add the appropriate devices to the man pages.

Obtained from: pcmcia-cs
Approved by: re (scottl)
2005-07-10 02:00:35 +00:00
Warner Losh
ce44283887 Add device entry for a Farallon EtherMac PC Card that I won on ebay. This
one is supported by the sn driver.

Approved by: re (scottl)
2005-07-06 15:56:16 +00:00
Warner Losh
5af5f40c75 Upon relection, we shouldn't allow the tuple structs to be modified by
the functor, so make it a const pointer, and chase down the resulting
const-poisoning.

Approved by: re (scottl)
2005-07-01 15:52:50 +00:00
Warner Losh
26db48b9b2 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)
2005-07-01 03:40:28 +00:00
Warner Losh
ab581af779 Eliminate unused argument in PCMCIA_CARD macro.
Provide a backwards compatible way to have the extra macro by defining
PCCARD_API_LEVEL 5 before including pccarddevs for driver writers that
want/need to have the same driver on 5 and 6 with pccard attachments.

Approved by: re (dwhite)
2005-06-24 14:36:54 +00:00
Warner Losh
a3e5dcfd76 Add wireless + flash CF card I have
Approved by: re (pccard API changes)
2005-06-24 14:32:24 +00:00
Damien Bergamini
ceaec73d40 Initial import of ipw, iwi, ral and ural drivers:
ipw  - Intel PRO/Wireless 2100
iwi  - Intel PRO/Wireless 2200BG/2225BG/2915ABG
ral  - Ralink Technology RT2500
ural - Ralink Technology RT2500USB

Approved by:	silby (mentor)
2005-04-18 18:47:38 +00:00
Warner Losh
2bf7a0e949 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)
2005-04-12 15:25:31 +00:00
Warner Losh
1a3f777ef4 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.
2005-04-12 06:00:06 +00:00
Warner Losh
a3e2432858 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@
2005-04-12 04:30:35 +00:00
Sam Leffler
2f83086184 deal with malloc failure
Noticed by:	Coverity Prevent analysis tool
2005-03-26 21:34:12 +00:00
Sam Leffler
4204b6b9a0 deal with failed malloc calls
Noticed by:	Coverity Prevent analysis tool
Glanced at by:	mdodd
2005-03-26 21:30:49 +00:00
Warner Losh
3eafe746ab 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
2005-03-18 16:37:51 +00:00
Warner Losh
36fed96550 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.
2005-03-18 05:19:50 +00:00
Warner Losh
d118c9a5fb Belkin F5D5020 is an OEM'd card from RACORE based on the AX88190
chipset.  Add support for this card.  Office Max has them on sale and
I was surprised that we didn't have it in our supported list when I
plugged it in...
2005-02-22 22:07:18 +00:00
Warner Losh
e8c3bb6966 memspace is set to some value by masking off bits. When these bits
are equal to PCCARD_TPCE_FS_MEMSPACE_NONE, memspace will be zero, so
testing for this case inside of the if statement results in dead code.
We'd fail to set a value to zero that's already zero (since it is
initialized to 0 indirectly) with this code being there.  Well, except
in the very rare case that we have a card that has a defualt entry
that includes a memory space followed by one that has no memory space
(these are extremely rare, I don't recall ever having seen one :-).

Fix this by setting num_memspace to 0 in a more appropriate place.

Submitted by: Coverity Prevent analysis tool
2005-02-17 21:05:04 +00:00
Warner Losh
1a0c32073e Add an XXX comment about string quoting. 2005-02-16 01:03:30 +00:00
Warner Losh
77ab642f58 Remove more deadwood that never got implemented in NEWCARD, since NEWCARD
went a different direction than was anticipated when these compatibility
shims were added.
2005-02-15 02:54:53 +00:00
Warner Losh
b658387fbd o It turns out that most of the ne-2000 cards that I have got real unhappy
with the latest changes.  They actually have valid ROM data at location
  0 of memory, just like a real NE-2000 ISA card.  Use this data, if
  the ROM passes a few basic tests, as an additional source for the MAC
  address.  Prefer the CIS over this source, but have it take precidence
  over falling back to reading the attribtue memory.
o Minor cleanup of a few devices that we match on based on CIS string.
2005-02-14 22:27:03 +00:00
Warner Losh
78ac8a9391 Remove card_get_function. It looks like it was intended to be a
bridge between OLDCARD and NEWCARD for drivers to inquire after the
function number (eg, 0, 1, 2).  Nobody ever used it, so retire it
with honors.  NEWCARD never implemented it, and the same information
can be obtained by the pccard_get_function_number().

MFC After: 3 days
2005-02-14 07:00:39 +00:00
Warner Losh
887a166c34 Remove DLINK_3, its unused. Remove NETGEAR FA410TX, since it is the
same as the LINKSYS COMBO_ECARD (which also seems to be the same as
another linksys product that also has a modem, but I can't find that
one at the moment).  Remove the PCM100, since it is now no longer
used.
2005-02-09 06:16:27 +00:00
Warner Losh
e1500f0d18 Sort PANASONIC products numerically 2005-02-03 23:45:20 +00:00
Warner Losh
8d2ad0b460 The two PLANEX cards listed in pccarddevs, identified only by their
CIS, weren't actually used anywhere (other than the generic PC Card
code when certain variables are defined).  They aren't used in NetBSD
either.  Make things simpler by removing them.  Change PLANEX_2 to
PLANEX and tweak wi and owi to use that instead.  The PLANEX id seems
to actually be pci ID assigned to planex, not its pcmcia id.  Ooops.
I don't know if this is a reporting error from where this entry came
from, or if it is a mistake on PLANEX's part.  I suspect the latter,
as ACTIONTEC and NEWMEDIA made the same mistake (although new media
may be because it uses an advansys chip inside).  Make a note of this
in the file.  The 0xc entires may be JEITA assigned, so note that as
well.

# This leaves just 3 entries that are totally unknown: airvast, archos
# and edimax although the arivast number is the same assigned to
# avertec in usb...
2005-02-01 18:28:09 +00:00
Warner Losh
e937d4a295 The Olicom OC2220 has an ID of 0x101, not 0x2220 as I previously
thought.  I'm unsure why I thought this was the case, but it
definitely isn't for this card.  If another card with the other ID
makes an appearance, then we'll add a second entry for it.

# With this change my Olicom OC2220 is now working again, since I make
# this commit with that device. :-)
2005-01-29 04:20:01 +00:00
Warner Losh
118c73087b Add back support for D-LINK DMR-650TX, and all the other OEMd versions
of this card (evidentally MultiMobile also sold this card as
MT5634ZLXI/E).

Reported by: Bastian Brinkman
2005-01-27 02:37:39 +00:00
Warner Losh
907c2b8ba1 Move 143 back to its rightful owner: Grey Cell systems, which OEMd enet cards 2005-01-27 02:33:03 +00:00
Warner Losh
f882eb5dad Turns out that Digital's DEPCM-BA and I-O Data PCLATE are both OEM
versions of the Racore PC Card Ethernet card.  Rearrange to reflect
this reality.  This ejects IODATA from 0x1bf, which belongs to Racore.

Thanks to Wilko for providing me with a dumpcis for the DEPCM card.

Also, added Nextcom Nexthawk card from NetBSD
2005-01-25 23:15:20 +00:00
Warner Losh
17e7b2783f Unbreak the Digital DEPCM-BA. Since it doesn't seem to have a proper
manufacturer ID, we need to use -1 rather than 0x100 when matching.
Do this by defining and using DIGITAL2 .
2005-01-25 18:31:45 +00:00
Poul-Henning Kamp
33ae5dfb15 Remove dummy vendor id for DIGITAL now that we have the real one. 2005-01-25 08:51:28 +00:00
Warner Losh
f93ad95f27 Minor whitespace cleanup
Add Digitial vendor ID (from NetBSD)
Add Anycom vendor and products (from NetBSD)
2005-01-25 07:46:47 +00:00
Warner Losh
72d45750d4 Add NEXTCOM NEXTHAWK ethernet card.
From NetBSD
2005-01-25 07:25:49 +00:00
Warner Losh
7d98fccaf3 There have been a substantial number of changes to this file from the
NetBSD original, so add our copyright notice as well.
2005-01-24 19:13:47 +00:00
Warner Losh
6c1b1bbc71 Add an entry for Magic Ram, Inc's ETHERNET PC CARD 933926 card I just
won on ebay.  Also, add a pointer to the PCMCIA's web site for the
registered tuples (== manufacturer ID's).
2005-01-24 17:59:59 +00:00
Warner Losh
d4c6cdea21 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...
2005-01-24 06:54:05 +00:00
Warner Losh
7d57300f4c u_intXX_t -> uintXX_t 2005-01-24 06:48:26 +00:00
Warner Losh
9cdd39c25f Some older PC Cards have a weird format for FUNCE tuples. They appear
as type 0, rather than the usualy type 4.  Assume that this format is
from an old standard and go with it.  The Fujitsu FMV-186A and Silicom
Ethernet cards I have both have tuples with this format, and they are
both pretty old cards.

# if somebody knows for sure, please let me know.
2005-01-21 02:11:48 +00:00
Warner Losh
c5c0655590 Use Intersil chip names for the symbols, since many makers use the
intersil IDs but their own name in the CIS.
2005-01-20 18:34:22 +00:00
Warner Losh
4cd3a82d7b Minor tweaks to properly order things. 2005-01-20 17:34:15 +00:00
Warner Losh
b72e9f1719 Fix spelling error
submitted by: Anders Hanssen
2005-01-19 20:21:44 +00:00
Warner Losh
ddd8ec50b0 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.
2005-01-17 06:54:48 +00:00
Warner Losh
29819e278a Tweaks to the name of this card, based on input from Sean Shapira. 2005-01-10 08:07:41 +00:00
Warner Losh
cc020351cd Add Eagle NE200 Ethernet LAN MBH10302 card. This appears to be a fe
card, and works with that driver.  However, Eagle is using Fujitsu's
vendor number and a product code of 4, which seems a little odd.
Still, there's no conflicts...
2005-01-10 03:45:21 +00:00
Warner Losh
098ca2bda9 Start each of the license/copyright comments with /*-, minor shuffle of lines 2005-01-06 01:43:34 +00:00
Maksim Yevmenkin
248a9ca8ba Shame on me. I screwed up product ID for the 3COM Bluetooth PC-Card.
It's 0x0040 not 0x0400.

MFC after:	3 days
2004-09-09 18:48:09 +00:00
Warner Losh
977b24f6e6 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
2004-08-16 15:57:18 +00:00
Warner Losh
3b8c0bec8a Don't nest includes here. There's no need and the subset included is lame.
Submitted by: bde
2004-05-28 02:24:07 +00:00
Warner Losh
33de92af3f Include required machine/bus.h 2004-05-28 02:23:10 +00:00
Warner Losh
9a7be62a1c Fixing disorder is the hardest thing in the world: Learn to sort :-)
Submitted by: bde
2004-05-27 15:21:51 +00:00
Warner Losh
54c9d8aabc These are now not needed, after repo copy and conversion. 2004-05-27 01:31:11 +00:00
Warner Losh
eb9482f4eb Sort includes, remove unnecssary ones.
Submitted by: bde
2004-05-27 01:27:04 +00:00
Warner Losh
dba6dd177b Move to generating pccarddevs.h on the fly, both for the kernel and
the modules.

Also generate usbdevs.h automatically now, but a non-kernel file is
stopping that at the moment.
2004-05-26 00:53:10 +00:00
Warner Losh
4cec015da7 Sync to pccarddevs 1.84 2004-05-13 01:24:48 +00:00
Warner Losh
4fa82af570 Add Intel EtherExpress PRO/100 LAN Modem. This will eventually be
added to xe once the pccard issues are resolved...
2004-05-13 01:24:26 +00:00
Maksim Yevmenkin
92f4dabf30 Resync 2004-05-10 02:26:49 +00:00
Maksim Yevmenkin
73a4a9a759 Mode few Bluetooth defines into system include files
Reviewed by:	imp
2004-05-10 02:24:56 +00:00
Warner Losh
62e40b13fe This file has never been used, nor will it ever be used in FreeBSD, so
remove it.
2004-05-09 07:09:30 +00:00
Warner Losh
8f54c15baf Improve reading of CIS cards:
(1) Align to 64k for the CIS.  Some cards don't like it when we aren't
    aligned to a 64k boundary.  I can't find anything in the standard
    that requires this, but I have 1/2 dozen cards that won't work at
    all unless I enable this.
(2) Sleep 1s before scanning the CIS.  This may be a nop, but has little
    harm.
(3) The CIS can be up to 4k in some weird, odd-ball edge cases.  Since we
    have limiters for when that's not the case, it does no harm to increase
    it to 4k.

#1 was submitted, in a different form, by Carlos Velasco.
2004-04-12 20:56:34 +00:00
Scott Mitchell
5c4d21fc1d Sync to pccarddevs 1.83
Reviewed by:	imp (mentor)
2004-04-09 17:10:12 +00:00
Scott Mitchell
caba814ad6 Add Xircom XEM5600 and known versions of CE2, CEM33 and CEM56.
Xircom had an unfortunate habit of re-using PCMCIA IDs for quite different
cards - the xe driver knows about this and uses the first byte of 'extra'
PCMCIA ID info to identify cards with ambiguous IDs.

Reviewed by:	imp (mentor)
2004-04-09 17:08:12 +00:00
Warner Losh
d0439ed0f0 Sync to pccarddevs 1.82 2004-03-25 21:56:43 +00:00
Warner Losh
5ebeb913ea Add a new Intersil card that DLINK is selling as the DWL-650.
Reported by: Brian O'Shea
2004-03-25 21:56:28 +00:00
Nate Lawson
5f96beb9e0 Convert callers to the new bus_alloc_resource_any(9) API.
Submitted by:	Mark Santcroos <marks@ripe.net>
Reviewed by:	imp, dfr, bde
2004-03-17 17:50:55 +00:00
Hajimu UMEMOTO
7a2e32cbe3 Sync to pccarddevs 1.81. 2004-01-21 16:03:40 +00:00
Hajimu UMEMOTO
a950ec6208 There is PANASONIC KXLC005 which has another product id. 2004-01-21 16:02:20 +00:00
KATO Takenori
dc25f9c07f Sync to 1.80. 2003-12-31 04:21:42 +00:00
KATO Takenori
996e86c529 Added ID for TDK LAK-CD031 Ethernet card.
Reviewed by:	imp
2003-12-31 04:19:50 +00:00
Warner Losh
a93efa3c97 Use %#jx for both args.
Non-use of %# mocked by: bde
2003-11-04 06:30:59 +00:00
Warner Losh
50d2d4c753 Fix two small style nits pointed out by bde: Remove spaces after cast and
indent continued line 4 spaces instead of 2.
2003-11-03 21:54:24 +00:00
Warner Losh
f97db4af7f Sync to 1.79 2003-11-03 16:12:27 +00:00
Warner Losh
ee4a63ca6c Add intel EtherExpress PRO PCMCIA card ID. Well, I don't know if it
is really EtherExpress or EEPro or what, but it does appear in a
couple of ethernet cards that have appeared recently on ebay.  Silicom
appears to make these cards, and they have the 82595TX chipset in
them, and sometimes uarts.  The ex driver needs some work to support
these cards, but I thought I'd get the device into pccarddevs.
2003-11-03 16:09:17 +00:00
Warner Losh
e1678e50a4 Sync to 1.78 2003-11-03 16:05:46 +00:00