Commit Graph

402 Commits

Author SHA1 Message Date
Warner Losh
82d2e53a57 When debugging CIS, only print 10 CISTPL_NULLs. Chances are good they
are all bogus, and the cards that don't decode things quite right
often have hundreds of them.  This will fix starvation of small dmesg
buffers and allow better debugging to happen.  I thought about adding
an override, but there is such a thing as too many knobs. :-)
2003-08-20 05:44:55 +00:00
Warner Losh
4aef3fb1c3 Put a band-aide(tm) on the CIS panic problem. This is a similar fix
to what is in NetBSD.  I have a few cards that tickles this bug, and
this just keeps us from panicing.  It doesn't actually fix the problem
(that will happen once I figure out why some cards hate the address
their CIS is mapped to high memory).
2003-08-18 03:07:09 +00:00
Warner Losh
610a3fb7a9 resync to pcarddevs 1.63 2003-08-14 06:27:48 +00:00
Warner Losh
190320c7eb add microsoft mn-520 wlan card.
submitted by: Kirk Strauser
2003-08-14 06:26:58 +00:00
Warner Losh
07dbfcd9cd Sync to 1.62 of pccarddevs 2003-08-07 19:36:06 +00:00
Warner Losh
b03ea4feee MELCO has a similar product to Buffalo LPC3-CLX: named the same and
has the same product id, but different vendor id.  It also appears
that the MELCO's id should be 0x18a instead of 0x8a01.  Fix this.

Submitted by: Shizuka Kudo-san
2003-08-07 19:33:11 +00:00
Warner Losh
c1d9e7fff1 Sync to 1.61 of pccarddevs 2003-07-26 17:46:43 +00:00
Warner Losh
5a344705e6 MFNetBSD:
1.183: gmcgarry; Add Sharp PALDIO 611S
1.184: martin; Socket LP 10/100 CF

Obtained from: NetBSD
2003-07-26 17:45:45 +00:00
Warner Losh
1bcb21f7d3 Sync to 1.60 2003-07-19 05:51:10 +00:00
Warner Losh
e220f38474 Add Linksys compact flash wireless card
Submitted by: Scott Lambert
PR: 53881
2003-07-19 05:49:17 +00:00
Warner Losh
0cfad826da sync to 1.59 2003-07-19 05:33:54 +00:00
Warner Losh
547b34290b Add Buffalo LPC3_CLX.
PR: 47786
Submitted by: IHA, genta -san
2003-07-19 05:32:07 +00:00
Warner Losh
fa3682c1c9 OpenBSD calls this AIRVAST, so use that instead 2003-07-15 07:22:21 +00:00
Warner Losh
f475f6fff3 sync to 1.58 2003-07-15 07:22:03 +00:00
Warner Losh
2f71d7885d sync to pccarddevs 1.57 2003-07-15 03:30:31 +00:00
Warner Losh
bf564bcd73 Add Siemens SpeedStream 1021
Obtained From: openbsd (1.105; millert)
2003-07-15 03:27:53 +00:00
Hidetoshi Shimokawa
558d6f9a60 Fix if_wi breakage. 2003-07-11 13:50:31 +00:00
Warner Losh
c3cee955c0 sync to pccarddev 1.55 2003-07-11 09:17:07 +00:00
Warner Losh
4aafc6cbf1 remove stray ASUS 2003-07-11 09:16:40 +00:00
Warner Losh
688a06fa4d sync to pccarddev 1.54 2003-07-11 09:15:45 +00:00
Warner Losh
386a95a275 Add asus wl100
PR: 49033, 53249
2003-07-11 09:15:21 +00:00
Warner Losh
6da5aafdda Sync to 1.53 2003-06-17 12:29:49 +00:00
Warner Losh
bd65adef88 Add FREECOM PCCARD-IDE 2003-06-17 12:29:20 +00:00
Warner Losh
309971e12e 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.
2003-06-13 21:30:29 +00:00
Warner Losh
cb8af9e613 regen for 1.52 2003-06-11 16:53:47 +00:00
Warner Losh
e8abadefcc Add ARtem ONAIR wi card.
Submitted by: Ben Gras
Forgotten by: imp
2003-06-11 16:53:26 +00:00
Warner Losh
a450b32915 Sync to 1.51 2003-06-03 01:29:58 +00:00
Warner Losh
b2cd313c17 Add another PCMCIA IDE CARD 2003-06-03 01:29:01 +00:00
Warner Losh
103cef9fdd Sync to 1.50 2003-04-27 03:32:09 +00:00
Warner Losh
0cb2efde14 Mystery OEM #1: A really no-name prism3 card that wi supports.
Submitted by: mwlucas
2003-04-27 03:31:47 +00:00
Warner Losh
914beb056b Sync to 1.49 2003-04-27 00:26:19 +00:00
Warner Losh
57bf268890 Add a generic cdrom. 2003-04-26 22:13:51 +00:00
Warner Losh
d6b4602222 Add accessor for cis4 string. Neither OLDCARD nor NEWCARD support
this yet, but that will change soon.

Pr: 51333
Submited by: Scott Mitchell
2003-04-23 23:32:53 +00:00
MIHIRA Sanpei Yoshiro
26954ebf4e Sync to 1.48 2003-04-18 15:35:52 +00:00
MIHIRA Sanpei Yoshiro
2af37380c8 fix corega vendor id(use vendor string and product string)
Submitted by:	imp
2003-04-18 14:52:14 +00:00
Warner Losh
46d5f4e726 Remove bogus line and entry, restore cnet ne2000 add smc 8041 2003-04-10 07:21:11 +00:00
Warner Losh
1cf793aaaf Sync to 1.46 2003-04-10 06:59:35 +00:00
Warner Losh
2b358bf2dc MFNetBSD:
1.182; christos
	A cardflash NE2000 from Michael Francini
	1.181; perry
	support Corega PCCL-11 -- from Christopher SEKIYA in PR 20932
	1.180; ichiro
	add product TOSHIBA PA2673U CBIDE2 (IODATA OEM)
	1.179; kanaoka
	Add SMC 8041TX 10/100 Ether PC Card.
2003-04-10 06:58:40 +00:00
Warner Losh
7de3ac49a9 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.
2003-04-10 04:11:15 +00:00
Warner Losh
68d25868d0 1.37 was committed prematurely: back out until I can commit all parts at the
same time.
2003-04-09 22:10:28 +00:00
Warner Losh
60feb70860 1.77 was bogus: there is no logic bug. Back it out and compare the
correct fields instead.
2003-04-09 22:07:02 +00:00
John Baldwin
685a76429a 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.
2003-04-09 21:24:23 +00:00
Warner Losh
7e9b53e399 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.
2003-04-09 15:54:00 +00:00
Warner Losh
bf1f89d49c Create new _ND versions to allow one to not specify the description be
stored in the table.
2003-04-08 15:28:58 +00:00
Warner Losh
6586fa7c43 MFP4:
o don't access struct resource members directly.
o Set a default device description based on the CIS name.
2003-04-08 07:02:03 +00:00
Warner Losh
0540e305b6 u_int*_t -> uint*_t
-1 -> 0xffffffff
2003-04-08 06:59:20 +00:00
MIHIRA Sanpei Yoshiro
e21115ab06 fix typo 2003-04-04 14:40:01 +00:00
Warner Losh
129edde443 pccarddevs_data.h no longer generated 2003-03-28 06:44:57 +00:00
Warner Losh
2983138955 MFp4:
Don't generate the data file.
Use 0xffffffff rather than -1 for sign safety as these fields are uint32_t.
2003-03-28 06:43:50 +00:00
Warner Losh
b43a533ddb Use %jd and a cast to intmax_t instead of a cast to long.
Minor style nit while I'm here.
2003-03-18 02:40:40 +00:00
Warner Losh
ec72163b64 Tag longling_addr as maybe using a bad type, I'm not sure. 2003-03-18 02:38:33 +00:00
Warner Losh
1831679c41 Regenerate for 1.45 2003-03-18 02:37:25 +00:00
Warner Losh
2a72cb5210 Add DLINK DWL650H
From NetBSD by way of deichen
2003-03-18 02:36:54 +00:00
Warner Losh
a163d034fa Back out M_* changes, per decision of the TRB.
Approved by: trb
2003-02-19 05:47:46 +00:00
Takeshi Shibagaki
617d6dd179 Regen. 2003-02-15 13:58:28 +00:00
Takeshi Shibagaki
a51440388a Add YIS YWL-11B. This card has same vendor id and product id
as XI300 Wireless LAN.
2003-02-15 13:57:52 +00:00
Takeshi Shibagaki
2fd866e6b2 Regen. 2003-02-01 04:47:51 +00:00
Takeshi Shibagaki
57b42a754d Allied Telesis WR211PCM(wi) and Corega PCC-T(ed) have
same manufacture id and product id. So use CIS info
(PCCARD_CISTPL_VERS_1).

reported by HONDA Yasuhiro <yasu@yasu.org>
2003-02-01 04:47:29 +00:00
Alfred Perlstein
44956c9863 Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
2003-01-21 08:56:16 +00:00
Takeshi Shibagaki
5770575cfc Add BUFFALO LPC-CF-CLT(10Base-T Compact Flash Ether Card). 2003-01-18 02:14:23 +00:00
Takeshi Shibagaki
d7c38c4ccc Regen. 2003-01-18 02:13:10 +00:00
Takeshi Shibagaki
708d4a51e6 Add Accton EN2216. 2003-01-18 01:14:48 +00:00
Takeshi Shibagaki
4779186a05 Regen. 2003-01-18 01:14:01 +00:00
Takeshi Shibagaki
3f9970c831 Add Allied Telesis WR211PCM. 2003-01-17 18:41:32 +00:00
Takeshi Shibagaki
57fc3d9703 Regen. 2003-01-17 18:40:31 +00:00
Takeshi Shibagaki
ef967a91bd Regen. 2003-01-11 13:01:40 +00:00
Takeshi Shibagaki
b40e62fd9d RATOC REX-R280(10Base-T Ether Card) and REX-9530(SCSI2 Card) have
same product id. So use CIS info(PCCARD_CISTPL_VERS_1).
2003-01-11 13:00:56 +00:00
Noriaki Mitsunaga
a11d8d7097 regen to 1.38
Reviewed by:	imp
Approved by:	re
2002-11-28 01:00:40 +00:00
Noriaki Mitsunaga
3c3dc1cf2e o Add PC-Cards' ID or CIS strings which are supported by ncv, nsp,
or stg driver. They are,

Macnica mPS110, PANASONIC(KME) KXLC004, Qlogic Fast SCSI,
Workbit Ultra Ninja-16, (ID based)

Future Domain SCSI2GO, IBM SCSI PCMCIA card, I-O DATA CBSC16,
Macnica mPS100, Newmedia BASICS-SCSI, RATOC REX-5536, RATOC REX-5536AM,
RATOC REX-5536M, RATOC REX5572, Workbit NinjaSCSI-3
(CIS based)

  Note: We need vendor IDs WORKBIT2 and IODATA3 which is -1, since some
        cards does not have IDs in the CIS and fails to be probed without
	this fake vendor IDs.

o Change the strings of RATOC REX_R280 from REX-R280 to REX-R280/REX-9530.
  This reminds us that REX-R280 and REX-R9530 have same ID (same product).

Reviewed by:	imp
Approved by:	re
Obtained from:	/etc/defaults/pccard.conf,
		List of CIS tupples by Toshihiko ARAI and PAO project:
			http://www.linkclub.or.jp/~clover/cis/
Change suggestion by:	HASEGAWA Tomoki <thasegawa@mta.biglobe.ne.jp>
			for I-O DATA CBSC16 entry
2002-11-28 00:57:47 +00:00
Maxime Henrion
b2423a5f88 Fix printf() format errors.
Reviewed by:	imp
2002-11-14 14:02:32 +00:00
Warner Losh
f02993557a MFp4:
o Use 32-bit unsigned types for things that really are 32-bit quantities,
  not bus_addr_t.  These are not the same as a bus_addr_t, so don't use
  that here.  Harmless on i386, introduced problems on sparc64.

Submitted by: jhb
2002-11-14 05:15:50 +00:00
Warner Losh
41e6d507ba Remove an impossible condition. pf->dev is always non-null here. 2002-11-14 05:13:52 +00:00
Warner Losh
c4d9c284e2 regen to 1.37 2002-11-14 05:07:20 +00:00
Warner Losh
637f9a2e17 Add a third aic-based bustoaster. 2002-11-14 05:06:25 +00:00
Warner Losh
bcaa6b0541 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
2002-11-02 23:00:28 +00:00
Warner Losh
7cb84123d4 sync to 1.36 of pccarddevs 2002-10-11 07:00:53 +00:00
Warner Losh
1ac1b586c1 Merge from NetBSD plus diff reduction to netbsd's pcmciadevs 1.177 file:
o NETGEAR2 -> NETGEAR_2
o PLANEX2 -> PLANEX_2
o ACTIONTEC HWC01170 -> ACTIONTEC PRISM
o linksys iwn2 -> iwn3
o Add: Ositech, DLINK_3, BAY emobility, buffalo lpc3_clt, netgear fa410TX.
  dynalink accton EN2216, corega ether II PCC TD, dlink dfe670TXD,
  dynalink l10c

Obtained from: NetBSD
2002-10-11 07:00:30 +00:00
Warner Losh
26bb14c4bb sync to 1.35 of pccarddevs 2002-10-11 05:40:45 +00:00
Warner Losh
5a702a282b Add a new NewMedia BUSTOASTER that I bought on ebay (sadly w/o scsi dongle).
Add PLANEX GWNS11H submitted by hanai-san.
2002-10-11 05:40:13 +00:00
Warner Losh
3688a119c4 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.
2002-10-07 23:05:33 +00:00
Warner Losh
a95bed74b3 Merge changes from NetBSD through version 1.17 of this file. These
give us slightly better error checking than before and interpret what
default bits mean better.  See the NetBSD CVS tree for the authors of
these changes (revs 1.10 .. 1.17).
2002-10-07 23:03:17 +00:00
Warner Losh
ca407d8777 MFp4:
o Return the right string for CIS4_STR
	o kill obsolete comment about not doing something that we now do.
2002-10-07 07:18:32 +00:00
Warner Losh
c6a6193f79 Better comment for the product ID thing. 2002-10-07 06:35:04 +00:00
Warner Losh
2d7a3e94bd 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.
2002-09-10 06:32:18 +00:00
Warner Losh
2b8356955f regen for 1.34 2002-09-10 06:29:50 +00:00
Warner Losh
0988c335ed Add ARGOSY SP320
cis submitted by: phk
2002-09-10 06:29:09 +00:00
Warner Losh
912f17daa2 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.
2002-09-04 06:53:37 +00:00
Poul-Henning Kamp
13c33c582a Drop another cookie to wet Warners appetite:
We need to call the drivers interrupt function even though the card is not
multifunction.
2002-09-03 11:24:25 +00:00
Warner Losh
4ee27e3969 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.
2002-08-31 18:34:30 +00:00
Poul-Henning Kamp
a15ddbdd65 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.
2002-08-31 16:07:17 +00:00
Poul-Henning Kamp
49bf3e26d1 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.
2002-08-31 14:38:24 +00:00
Warner Losh
6c596e8d0b pccbb -> cbb 2002-08-15 08:02:23 +00:00
Warner Losh
db64ac4457 Don't redundantly include \n in panic messages 2002-08-12 22:34:12 +00:00
Warner Losh
c1bb793bbb Eliminate the need for pccard_common.c by moving the function inline
in the .h file.  Make it static __inline to make sure that it doesn't
wind up defined in any files.

Also, fix a typo that said null_do_attach instead of null_do_probe.
2002-07-17 05:20:43 +00:00
Warner Losh
bdcb2d73e4 regen from pccarddevs 1.33 2002-07-17 04:02:52 +00:00
Warner Losh
8f414056fa MFOpenBSD:
1.93; henning; MA401RA wi card
1.92; millert; elsa XI-325 wi card
1.91; fgsch; gemplus cpr400 smartcard reader
1.90; mickey; Nokia c110/c111 is prism2 card
1.89-1.86 (similar to what we do already)
2002-07-17 04:01:57 +00:00
Takanori Watanabe
80f1001813 Make oldcard and newcard kernel module work. 2002-05-30 17:38:00 +00:00
Warner Losh
0d2a385fa9 Catchup to 1.32 2002-04-11 21:19:04 +00:00
Warner Losh
7afbcf5ed0 Add ACTIONTEC HWC01170 from OpenBSD 2002-04-11 21:18:17 +00:00
Warner Losh
c385d0928b catch up to 1.31 2002-04-05 16:25:34 +00:00
Warner Losh
0d1049364f Add 3crwe77a 2002-04-05 16:25:03 +00:00
Warner Losh
e17179bd8c Regen for 1.30 pccarddevs 2002-04-02 05:47:08 +00:00
Warner Losh
3b7f54aabe Actually merge proxim rangelands and addtron awp-100 2002-04-02 05:46:10 +00:00
Warner Losh
09d7bb7a18 regen to 1.29 pccarddevs 2002-04-02 05:39:40 +00:00
Warner Losh
cd5b41423a Merge from both NetBSD and OpenBSD's pcmciadevs:
NetBSD:
	1.163; martin; ELSA MicroLink mc all
	1.162; is; typo
	1.161; is; typo
	1.160; is; Add Lantech Fastnet/TX
OpenBSD:
	1.85; millert; proxim rangelan-ds
	1.84; provos; linksys wpc11
	1.83; mickey; now wires needed wlan
	1.82; mickey; socket low power wlan from netbsd [*]
	1.81; mickey; ericsson wlan
	1.80; fgsch; add openbsd tag back (not needed)
	1.79; fgsch; Netgear FA411
	1.78; mickey; simple spectrum25 from netbsd [*]
	1.77; mickey; emtac wavelan from netbsd [*]
	1.76; mickey; buffalo wavelans from netbsd [*]
	1.75; jakob; 3com wilress lan pccard
	1.74; mickey; linksys2 instant wireless
	1.73; mickey; oops (add closing quote)
	1.72; mickey; pcm100
[*] (already in freebsd)

Obtained from: NetBSD, OpenBSD
2002-04-02 05:39:07 +00:00
Warner Losh
4e4b1656c2 Improve support of MFC cards (Multi-function cards). This commit
allows us to properly parse cards with attribute memory based CIS that
before wouldn't parse correctly, sometimes with a panic.  This allows
me to get my 3C562 modem/ethernet card to fail to attach due to
problems in the ep and sio drivers rather than due to problems in the
CIS parsing code :-).

We weren't setting the address to jump to for the function entries.
This caused us to only work when the addional entries were after the
first ones.  On the 3C562/3C563 card this was not the case.

We were also mapping Attribute memory when common memory was asked for
in the target of the LONGLINK_{A,C} or LONGLINK_MFC.

My IBM Home And Away Modem/LAN card still fails for reasons unknown.
2002-03-29 08:05:39 +00:00
Warner Losh
fb33cfa8f5 Regen for 1.28 of pccarddevs 2002-03-17 05:06:37 +00:00
Warner Losh
a5a492981c Add support for the home Wireless Network airway wireless pcmcia card.
I cannot find where I got these patches, but I think it was from the
bsd-nomads mailing list.  Please contact me if you posted them there.
2002-03-17 05:05:42 +00:00
Warner Losh
7cdb5c5ec4 Make hw.pccard.debug and hw.pccard.cis_debug tunable/sysctl. Setting to 1
will enable more verbose debugging output from the pccard system.
2002-03-07 08:03:53 +00:00
Takeshi Shibagaki
57ffbd6e54 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
2002-02-20 14:30:46 +00:00
Warner Losh
b0fc3f6b1b 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.
2002-02-19 05:04:37 +00:00
Warner Losh
ab246934dc Do the cast away of unsignedness in a way that is more commprehensible. 2002-02-19 05:01:43 +00:00
Warner Losh
fbf6f7f1d6 Null interrupt handlers should be OK, so if we don't have a function,
just return.
2002-02-10 05:04:20 +00:00
Warner Losh
27d4dd7420 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.
2002-02-10 03:34:44 +00:00
Warner Losh
5e0cb3e9d3 Boot verbosify printing the CIS, since we don't normally need to do that. 2002-02-09 21:34:06 +00:00
Warner Losh
fd173deae3 Remove DETACH_NOWARN 2002-02-07 06:43:29 +00:00
Warner Losh
a0e457a620 Default debugging to OFF now. 2002-02-04 15:55:21 +00:00
Warner Losh
a91e00697e Move cardaddr to memory structure.
Forgotten by: imp
Reminded by: Dave Cornejo
2002-01-29 16:57:50 +00:00
Warner Losh
dadd95dbbe Sync to 1.27 of pccarddevs 2002-01-29 06:10:15 +00:00
Warner Losh
a3cc3a9e83 MFNetBSD:
1.159: sorting (not relevant to us, since I'd done thie before)
	1.158: joda; Ericsson PRISM2 WIRELEASS LAN CARD.
	1.157: aymeric Edimax Technology ethernet card
2002-01-29 06:09:39 +00:00
Warner Losh
7be18016b5 Regenerate from 1.26 pccarddevs 2002-01-08 20:52:57 +00:00
Warner Losh
e5c51b0548 Catch up to NetBSD:
1.156 pooka; Socket Low-Power CF WLAN
	1.155 ichiro; IBM Smart Capture Card II
	1.152-154 ichiro; Fujitsu CF EtherCard and FMV-181,182,182A
	1.151 christos; Symbol Spectrum24
2002-01-08 20:52:23 +00:00
Warner Losh
a432b68b87 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>
2001-12-15 05:58:28 +00:00
Warner Losh
ebc7a029f4 Sync to pccarddevs 1.25 2001-12-12 20:06:29 +00:00
Warner Losh
a7958b9d73 Move LINKSYS2 to its correct numerical location.
Add BONDWELL B236 Game Card Joystick.  A PC Card joystick card.
2001-12-12 20:05:48 +00:00
Warner Losh
d29f1aafa9 implement MFC links properly (and I think long links too). This make
the sprint wireless card try to attach.  Sadly, the pci code at the
bridge keeps this from happening.

Bug w/o PR: jhb :-)
2001-12-04 13:48:16 +00:00
Warner Losh
f471b125bb Sync to 1.24 2001-11-28 08:33:41 +00:00
Warner Losh
7a9b0e83d5 Merge from NetBSD:
1.147 (my changes to sync to FreeBSD's file)
	1.148 Buffalo AirStation CFtytpe WLAN Card (ichiro)
	1.149 IBM SCSI PCMCIA (yamt)
	1.150 <restore 1.148 lost in 1.149> (enami)
2001-11-28 08:33:12 +00:00
Warner Losh
e8cb41d36f 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).
2001-11-26 07:14:00 +00:00
Warner Losh
03bfaba97c Weed out those pccard entries that match everything. These are too
dangerous to allow :-)

This should fix the ed1: <PLANEX ... bug.
2001-11-20 06:15:24 +00:00
Warner Losh
5bbac2b91d Update to 1.23 pccarddevs 2001-11-19 06:28:20 +00:00
Warner Losh
d2e623d7ef Add ZOOM as one of the bgous vendors 2001-11-19 06:27:33 +00:00
Warner Losh
eb321069c2 Update to 1.22 pccarddevs 2001-11-19 05:22:46 +00:00
Warner Losh
fec4038832 Nits to make it whitespace compatible with what I'm about to commit to NetBSD 2001-11-19 05:22:28 +00:00
Warner Losh
49fe5a5891 Update to 1.21 pccarddevs 2001-11-19 05:11:50 +00:00
Warner Losh
1f0d8efbc3 Merge NetBSD 1.146: Linksys Instant Wireless Network card.
Obtained From: NetBSD
2001-11-19 05:11:35 +00:00
Warner Losh
3ae1e1bed3 Update to 1.20 pccarddevs 2001-11-19 05:04:08 +00:00
Warner Losh
83f4f9209a Merge NetBSD 1.145: Xircom XE2000 2001-11-19 05:02:55 +00:00
Warner Losh
247e08d681 Regenerate with 1.19 of pccarddevs 2001-11-16 06:59:27 +00:00
Warner Losh
9022e7256a Merge in most (hopefully all) of the devices that OpenBSD has that
NetBSD/FreeBSD doesn't have listed.
2001-11-16 06:58:47 +00:00
Warner Losh
d93f2e2458 Sync to 1.18 of pccarddevs 2001-11-15 07:50:38 +00:00
Warner Losh
720725c93b Add vendor for NDC. 2001-11-15 07:50:09 +00:00
Warner Losh
34e4437eb0 Hoist the Card/Card2 macros that I invented for the wi driver into
pccard layer and rename them PCMCIA_CARD and PCMCIA_CARD2 respectively
(note, this is being done with an eye towards NetBSD integreation so
it is easier to keep lists of cards between us and them in sync).

Use this in the an and wi drivers.
2001-11-15 06:37:13 +00:00
Warner Losh
cfc78f73bd Sync to 1.17 of pccarddevs 2001-11-11 23:52:49 +00:00
Warner Losh
ac5e5bcb16 Add GENTEK as one of the bogus vendors we need to id cards from the cis 2001-11-11 23:52:28 +00:00
Warner Losh
fdacad4e76 Sync to 1.16 pccarddevs to get new PCMCIA_ symbols 2001-11-11 20:15:47 +00:00
Warner Losh
e2a83ea7f8 Move from using PCCARD_ symbols gereated from this file to using PCMCIA_
symbols so that driver lists are easier to share and keep in sync.
2001-11-11 20:15:06 +00:00
Warner Losh
362114aa78 Sync to 1.15 pccarddevs 2001-11-11 19:37:28 +00:00
Warner Losh
50fa078ee5 MFNetBSD:
1.140	imp (that's me)		sort the file
	1.141	christos		Another cdrom
	1.142	mjl			Corega PCCB-11
	1.143	mjl			Corega PCC-TD
	1.144	ichiro			ELSA CF wavelan card XI-800
2001-11-11 19:36:44 +00:00
Warner Losh
239db728ab Regen. 2001-10-05 05:32:51 +00:00
Warner Losh
e9530498a7 MFNetBSD:
1.139: augustss; Add EigerLabs sound card.
	1.138: ichiro; Typo
	1.137: ichiro; GEMTEK CF-size WaveLAN card based on Prism2.5 eval
	1.136: ichiro; Symbol Spctrum24 LA4100 Series CF WaveLAN card
	1.135: pooka; Psion Gold Card
	1.134: christos; zonet zen (Henrik Berglund)
	1.133: christos; dlink-660+ (janberg@netbsd.org)
	1.132: itojun; 3Com 3CRWE62092A Wireless LAN
2001-10-05 05:32:27 +00:00
Takeshi Shibagaki
a8bc31671a 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
2001-09-02 06:37:41 +00:00
Jonathan Chen
71e7902026 Make pccard_product_lookup non-static again...
When something is exported, do not mark it as static for no apparent reason...

Broken by: me
2001-08-27 11:28:00 +00:00
Warner Losh
533dc59976 More notes to the reader about issues in pccard code here. 2001-08-27 01:24:33 +00:00
Warner Losh
fe63bdcc6a Merge notes, but not code, from my latest tree on pccard_function_init and pccard_function_free 2001-08-27 01:18:21 +00:00
Jonathan Chen
63fa9f4c0d 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
2001-08-27 00:09:42 +00:00
Jonathan Chen
c83acdc307 Non-functional changes to NEWCARD stuff.
This is the first part of a two-part update to NEWCARD.  Changes in this
commit are non-functional, and includes the following:
 * indentation and other changes to meet style(9).
 * other minor style consistancy changes
 * addition of comments
 * renaming of device_t variables to be consistant across all of NEWCARD.

(note that not all style violations are fixed in this commit -- those that
 aren't will be clobbered by the next commit.)
2001-08-26 23:56:49 +00:00
Assar Westerlund
20de0f980e null_do_probe: mark as unused 2001-07-21 17:10:30 +00:00
Warner Losh
e3b32280d9 Sync to pccarddevs 1.12 2001-07-05 03:20:48 +00:00
Warner Losh
6b3224653a Merge from NetBSD:
1.131: crhistos; cn40bc ne clone
	1.130: ichiro; COREGA FEther PCC-TXF
	1.129: ichiro; nits
	1.128: ichiro; National Instruments pcmcia GPIB
	1.127: jhawk; Socket EA ethernet
	1.126: ichiro; Intel PRO/Wireless 2001 LAN PC Card
	1.125: ichiro; BUFFALO AirStation 11Mbps WLAN Card
	1.124: ichiro; Corega FEther PCC-TXD
	1.123: onoe; Cisco Aironet 350 Series
	1.122: ichiro; I-O DATA WN-B11/PCM wlan
	1.121: aymeric; Synergy 21 S21810+
	1.120: thorpej; D-LINK DMF-560TX
	1.119: ichiro; typo
	1.118: ichiro; some wavelan card
	1.117: ichiro; Contec FLEXLAN/FX-DS100-PCC wavelan
	1.116: ichiro; COMPAQ Wireless CARD NC5004(Prism2)
	1.114: thorpej; Xircom CreditCard Token Ring II
2001-07-05 03:19:43 +00:00
Warner Losh
f40d7afa05 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.
2001-05-10 06:55:39 +00:00
Duncan Barclay
0a177c3dca Add additional enumeration types for CARD_SET_RES_FLAGS.
Approved by:	imp
MFC:	after 1 week
2001-05-08 23:56:47 +00:00
Warner Losh
dc8e185f93 Add accessor/ivar for the "function". This is so we can generically
match disks and serial ports and maybe others.
2001-04-21 04:08:39 +00:00
Warner Losh
19f1fe42e6 Only try to delete the resource if we actually got it. 2001-04-21 02:29:09 +00:00
Warner Losh
c33c1284cb 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.
2001-03-22 06:00:07 +00:00
Warner Losh
f55f5ee276 Sync to last changes. 2001-03-22 05:52:42 +00:00
Warner Losh
15c1a6aede Add zoom air 4000. 2001-03-22 05:51:58 +00:00
Warner Losh
2873ce752b Style(9) changes:
put parens around return (statements);
	Use ANSI funcitons only.
2001-03-22 05:41:20 +00:00
Poul-Henning Kamp
37d4006626 Another round of the <sys/queue.h> FOREACH transmogriffer.
Created with:   sed(1)
Reviewed by:    md5(1)
2001-02-04 16:08:18 +00:00
Warner Losh
da15fcf11c 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.
2001-01-21 08:09:00 +00:00
Warner Losh
612efca22c remove duplicate entry that snuck in during the merge. 2001-01-21 04:33:12 +00:00
Warner Losh
ac0f7daa5e Sync to pccarddevs 1.9 2001-01-20 02:04:26 +00:00
Warner Losh
e7c584e06b Sync with NetBSD (again, after I got the most up to date file):
o 1.111 imp Sync with FreeBSD.
o 1.110 nonaka Add Roland SCP-55
o 1.109 ichiro add NANOSPEED ROOT-RZ2000 WLAN Card
o 1.108 ichiro add EMTAC A2424i 11Mbps WLAN Card
2001-01-20 02:03:53 +00:00
Warner Losh
d7abc1d83d sync with pccarddevs 1.8. 2001-01-20 01:49:17 +00:00
Warner Losh
464c9a2316 Correct entry for RATOC REX_R280 to comply with style used in the rest
of the file.
2001-01-20 01:48:55 +00:00
Warner Losh
4dff132fa5 Sync with pccarddevs. 2001-01-20 01:42:22 +00:00
Warner Losh
8c4587fd4a Sync with NetBSD. v1.98->1.107:
o 1.107 haya	Add IO Data CBIDE2 ata interface card.
o 1.106 jhawk	s/NULL}/NULL }/
o 1.105 thorpej	" " -> "&sp" in two entries, per Rafal Boni.
o 1.104 thorpej	Add SMC 2632W.  From Rafal Boni, kern/11775.
o 1.103 drochner add IBM microdrive
o 1.102 soren	Typo.
o 1.101 hubertf	Add ELSA WaveLAN card & a noname clone(?)
o 1.100 toddpw	Socket Comm. PC Card Ethernet, and tidy up naming.
o 1.99 msaitoh MELCO LPC2-TX, Telecom Device TCD-HPC100,
	        MACNICA ME1-JEIDA
o 1.98 imp	Sort BAY into numerical order. (already in FreeBSD)
2001-01-20 01:41:25 +00:00
Peter Wemm
7722df0394 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
2001-01-07 21:32:05 +00:00
Warner Losh
584d978729 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.
2001-01-07 20:40:23 +00:00
Warner Losh
2f58d9cc31 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).
2001-01-07 20:36:27 +00:00
Warner Losh
486d464d74 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)
2001-01-07 16:31:09 +00:00
Warner Losh
1bc96f7afd 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.
2001-01-07 08:08:54 +00:00
Peter Wemm
7e6e7300d0 We do not, and hopefully never will, use the static pccard device table. 2001-01-07 03:58:57 +00:00
Jonathan Chen
0c95c70577 * 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
2001-01-06 18:04:55 +00:00
Jonathan Chen
c3342a3d99 Oops, broke newcard because I forgot to commit this in my last round of changes to pccbb.c 2000-11-28 15:50:13 +00:00
Peter Wemm
c20d96e7c4 Regenerate. Note that pccarddevs_data.h is not used. 2000-11-25 03:43:37 +00:00
Peter Wemm
1d75be41ac Add Kingston and the KNE-PC2 card 2000-11-25 03:42:06 +00:00
David Malone
66efa50621 Make a few more mallocs use M_ZERO.
Submitted by:	josh@zipperup.org
Submitted by:	Robert Drehmel <robd@gmx.net>
Approved by:	imp
2000-10-29 16:29:05 +00:00
Warner Losh
fe8d027cd8 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.
2000-10-22 04:46:56 +00:00
Warner Losh
4659a20822 Get the interrupt correct. 2000-10-20 20:27:22 +00:00
Warner Losh
7ae6b1ebd2 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.
2000-10-19 22:36:41 +00:00
Warner Losh
cc8e7d4250 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.
2000-10-18 02:21:00 +00:00
Warner Losh
c5cdd6f29e 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).
2000-10-17 06:29:21 +00:00
Warner Losh
9344caaf08 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.
2000-10-16 07:51:12 +00:00
Warner Losh
d62abc771f 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.
2000-10-15 17:21:50 +00:00
Warner Losh
5f7e36d111 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.
2000-10-09 03:40:15 +00:00
Warner Losh
e69d122232 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.
2000-10-07 05:48:51 +00:00
Warner Losh
8456e16e24 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.
2000-09-22 01:15:26 +00:00
Warner Losh
2276cee521 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.
2000-09-19 04:39:20 +00:00
Warner Losh
45713b37cd 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.
2000-09-16 06:52:20 +00:00