Commit Graph

197 Commits

Author SHA1 Message Date
fvdl d9e2aff0df Add explicit config values for 8 bit and offset EEPROMS, since this
property is now shared with the PCI frontend.
2000-09-19 01:10:12 +00:00
haya 6502a2efd8 Clean-up: Remove unnecessary global reset (for debug) and change the
name of some variables for the consistency of naming rule.
2000-09-12 03:19:51 +00:00
haya 4171157155 Clean-up card-type depend code. 2000-09-05 09:01:17 +00:00
haya 25147761ff Add support 3C[CX]FE575CT. 2000-08-29 08:54:50 +00:00
haya 403941c60d Regen to correct wrong keyword. 2000-08-28 10:35:59 +00:00
haya 7591b1332b Correct wrong keyword. 2000-08-28 10:33:58 +00:00
haya 21ddff737c Regen. 2000-08-28 09:18:09 +00:00
haya 86063b7c73 Add 3Com 3C656 LAN + MODEM CardBus cards. 2000-08-28 08:59:49 +00:00
joda ce1bf05583 update description 2000-08-22 11:42:14 +00:00
cgd 1ce8331ad9 nuke some final __BROKEN_INDIRECT_CONFIG bits that weren't caught by
unifdef last time.  (bloody things just won't stay dead!)
2000-07-02 06:25:46 +00:00
cgd eee18e1f6c beat back the undead: __BROKEN_INDIRECT_CONFIG had risen, and was
terrorizing innocent hackers...
2000-06-16 23:41:33 +00:00
soren 45bdc51fa2 Regen. 2000-06-13 15:37:29 +00:00
soren d862695c41 Make 3Com names a little more consistent. 2000-06-06 17:21:42 +00:00
haya f89b0f51ae Call extent_alloc_subregion() with EX_MALLOCOK in
rbus.c::rbus_space_alloc_subregion().
2000-05-30 09:18:06 +00:00
haya de5dacd81d KNFfied those files. 2000-05-26 06:32:56 +00:00
tsutsui f2973e2fb8 - Change RL_* -> RTK_*
- Free bus_dma resources if attach fails
- Add detach and power management code

Patch from Masanori Kanaoka <kanaoka@ann.hi-ho.ne.jp> in kern/10156.
2000-05-19 13:42:29 +00:00
thorpej 1cff94b896 Add missing field in static initialization. 2000-05-19 04:03:33 +00:00
thorpej e5ae7c287a Symbol namespace cleanup: rl_ -> rtk_ 2000-05-15 01:55:12 +00:00
haya 014be1da8b Move if_rl_cardbus.c:1.8 to if_rtk_cardbus.c. 2000-05-10 00:24:14 +00:00
augustss 1a1595070f Fix the most glaring bug in the old rbus code. This way your machine won't
panic with a 3c562, but it won't work either.
2000-05-08 19:27:00 +00:00
augustss 5da7a65ca6 Back out my rbus change since it seems to break things. 2000-05-08 19:25:46 +00:00
thorpej 79cbea8cc3 Don't use not-in-user-namespace variable names that newer versions of
GCC doesn't like very much.
2000-05-08 18:23:36 +00:00
augustss 20edddd023 KNF the code and fix three bugs:
* If a non-zero addr was given to rbus_space_alloc_subregion() it would
   claim to have allocated region when in fact it just failed.
 * If a non-zero addr was given to rbus_space_alloc_subregion() allocation
   often (always?) failed when it shouldn't.
 * One part of rbus_space_alloc_subregion() used an alignment that always
   made the kernel panic.
I'm not sure if my change is correct, because I don't know what this code
is supposed to do.  But now I can use a 3c562 card.
2000-05-08 14:00:05 +00:00
tsutsui 9498452c05 - Move some initialization into MI rl_attach() from each bus attachment.
- Use proper CARDBUS_* macro in if_rl_cardbus.c
- Use product ID read from PCI configuration space rather than from EEPROM
  in if_rl_pci.c.

Patch sent from Masanori Kanaoka <kanaoka@ann.hi-ho.ne.jp> and
some cosmetic changes by me.
2000-05-01 15:08:50 +00:00
tsutsui 439b360ab9 Modify EEPROM read functions and handle also 9356 EEPROM.
Fixes kern/9861.
2000-04-30 12:00:40 +00:00
tsutsui 61e3f39169 Fix copyright notice as per request from the author. 2000-04-28 03:48:56 +00:00
augustss 30c20f930f Change my email address. 2000-04-27 15:26:44 +00:00
tsutsui b4f524c223 - Allocate mbuf dynamically on Tx and use bus_dmamap_load_mbuf(9).
- Call bus_dmamap_sync(9) as appropriate.
- Leave only register declarations in rtl81x9reg.h and
  split other stuff into rtl81x9var.h.

bus_dma(9) code mostly taken from thorpej's if_rtp.c.
2000-04-26 14:02:34 +00:00
augustss 74beeca710 Move the size of the mapped bus_space region into the bus independent softc. 2000-04-25 09:20:54 +00:00
tsutsui 6f9392b42a Merge changes of sys/pci/if_rl.c rev. 1.8->1.10. (from kern/9870)
Also remove unused pbase, vbase and PCI_CAP_PWRMGMT declarations.
2000-04-24 15:25:00 +00:00
haya 784977f319 Changes the name of RealTek driver. The new name is `rtk'. This used
to be called `rl' and it conflict with RL vax disks, canonical and
historical unix driver name.

This changes are minimal: it only changes the name of RealTek driver.
The filename of source code and a lot of the letter `rl' in source
files should be changed shortly.
2000-04-19 08:44:31 +00:00
haya edfd8044ec Maintenace: add definitions for command status register. 2000-04-19 01:19:04 +00:00
joda 7dbedb5a11 rewrite match function to use CIS information 2000-04-17 09:21:59 +00:00
joda 1f1d169e20 extract serial funce 2000-04-17 09:16:38 +00:00
joda 6e5b98b12c add serial funce entry 2000-04-17 09:15:58 +00:00
veego 8c1897c2fd Also add the Intel ID for the LAN+MODEM56 card to the csdevs list to get
it working.
2000-04-15 06:29:25 +00:00
joda e3f576a688 disable function after attach 2000-04-13 16:17:55 +00:00
joda 90bee16298 enable com at cardbus 2000-04-13 11:18:24 +00:00
joda 8fba568264 cardbus attachment for com devices (thanks to Chris Demetriou and
Darren Reed for constructive criticism and help with testing)
2000-04-13 11:17:53 +00:00
joda 3692f27c7d regen 2000-04-13 10:13:12 +00:00
joda 69241946d8 add entry for a Xircom modem (as reported by Darren Reed) 2000-04-13 10:12:46 +00:00
joda 81bac16312 add CARDBUS_SUBCLASS_COMMUNICATIONS_SERIAL 2000-04-13 10:11:15 +00:00
haya 21837796b8 Maintenace: add NetBSD tag and correct the name of the auther. 2000-04-11 06:57:59 +00:00
haya 1e921e0bd3 Regen. 2000-04-10 07:46:51 +00:00
haya e49807d100 Incorporate the changes of RL81x9 driver provided by M. Kanaoka
<kanaoka@ann.hi-ho.ne.jp>.  He separated the driver into IC specific
portion and bus attachment portion and added cardbus attachent.
2000-04-10 07:42:55 +00:00
thorpej 5ecdfa3fc0 Rearrange the 21142/21143 SROM/CIS handling code to give it a chance
of working, and last-ditch default to MII-over-SIO with no reset routine
if we don't find an ISV SROM or quirk.
2000-04-04 19:33:21 +00:00
thorpej 5a41b5bf56 - if_tlp_cardbus.c: Use the `pmreg' pointer passed by by
cardbus_get_capability() [mirror change already made to if_tlp_pci.c]
- if_tlp_cardbus.c: If we don't find an ISV SROM, try to grab the
  Ethernet address from the CIS.
- if_tlp_cardbus.c: set CardBus cards to store-and-forward mode from
  the get-go.
- Put the TxThresh tables in tulipvar.h, and use them in the CardBus
  and PCI front-ends to go to store-and-forward mode.
- Document the Xircom X3201-3 clone a little more.
2000-04-04 19:22:50 +00:00
mycroft 8aeb8df354 Add a flag to tell whether a MAC address was actually found in the CIS.
XXX This whole piece of code should go away ASAP.  We should use a callback
as in the PCMCIA code.  In fact, we should use the PCMCIA code...
2000-04-02 19:11:37 +00:00
haya ddd36bd41a 1. Do not apply 5 V on a CardBus card.
2. Do not avoid ISA hole when a device requires more than
   256-byte io space.
3. Remove sending CardBus bridge's function number to
   cardbus stack.  This number is not needed for anyone.
2000-03-22 09:35:06 +00:00
thorpej ed332d840a In tlp_cardbus_detach(), only unmap the bus space if we were able to
map it in the first place.  Pointed out by enami@netbsd.org.
2000-03-22 01:35:14 +00:00
thorpej 8de21980d9 Fix logic bug in fxp_cardbus_match(). 2000-03-22 00:17:46 +00:00
thorpej 92c19e5ff7 Add suspend/resume hooks to ensure that the chip doesn't scramble memory
after an APM suspend and is unsnoozed after an APM resume.
2000-03-19 21:45:23 +00:00
enami 5336e37153 Make this file just compiles again.
XXX Don't expect to work yet.  It fails even to link depending on your
XXX kernel config file.
2000-03-16 03:06:51 +00:00
thorpej c38405d33d Add power management support to the `tlp' driver. The battery on my
laptop lasts a whole lot longer now.
2000-03-15 18:39:50 +00:00
fvdl 2da1f00fcd Update cardbus frontend for new ahc driver. 2000-03-15 02:03:51 +00:00
thorpej 297455cbe2 Pick I/O before Memory space. 2000-03-14 02:08:21 +00:00
soren 95054da1a1 Fix doubled 'the's in comments. 2000-03-13 23:52:25 +00:00
veego 347a1f736e Reverse the mapping of the control/status registers. Use I/O before MEM.
My card works now on a TI1220 chipset. Approved by Jason.
2000-03-12 17:05:23 +00:00
thorpej 7e044bd4e5 Move pretty much all of the PCI configuration goo into a separate
function.
2000-03-10 07:26:41 +00:00
thorpej 370bc1832b Normalize the copyright notice (TNF copyrights should *always* match
the appropriate template), and run through indent.
2000-03-10 07:11:47 +00:00
thorpej 0fef451485 Pull the code that take the Tulip out of powersave mode into a separate
function.
2000-03-10 06:55:09 +00:00
haya 4398e0bd07 Fix CardBus device number. Though CardBus device number should be 0,
the value of bridge's function number was assigned to the device
number.
2000-03-07 09:36:52 +00:00
thorpej 8f8714687b Reenable the code that clears SLEEP and SNOOZE from the CFDA register. 2000-03-07 01:08:47 +00:00
mycroft 4887635a10 A few things:
* Take advantage of the tulip_read_srom() changes.
* Don't frob the so-called `CFDA' register.  We're really looking for the
  PMCSR, which is in a different location anyway.
* Don't panic if we detach an interface for which we never called tlp_attach().
2000-03-07 00:43:36 +00:00
mycroft 8b13d21260 Do a CARDBUS_BM_ENABLE to be sure. 2000-03-07 00:32:52 +00:00
mycroft de8398315a Fix an obvious bug that caused I/O space to never be freed.
Also, don't use rbus_space_free() directly.
2000-03-07 00:31:46 +00:00
mycroft bcdcb370e5 Called the power function even for 5V cards. This at least gives the power
a chance to stabilize before we frob the card.
2000-03-07 00:30:57 +00:00
thorpej 54e0e80815 Cosmetic change. 2000-03-01 20:50:56 +00:00
thorpej 08483fcddc When unmapping these on detach, pass the BAR to unmap (not the type of
the BAR!!)
2000-03-01 20:50:37 +00:00
soren d282f771e7 Remove redundant CIS definitions. 2000-02-18 18:55:31 +00:00
enami 01868857df Add activate routine and check device active flag also in one second
tick handler.
2000-02-12 04:05:49 +00:00
joda d40e2b51ee add detach code 2000-02-09 22:15:57 +00:00
itohy 0a1d6b1357 Make it compile with options DEBUG.
Reported by Kawamoto Yosihisa (PR #9379).
2000-02-09 07:57:52 +00:00
augustss 494c9affea Support detach. 2000-02-05 18:11:55 +00:00
augustss e037c568cb Update for cardbus unmap changes. 2000-02-04 13:48:23 +00:00
augustss 1facb42e6e Make the driver work even if DIAGNOSTIC is not set. 2000-02-04 13:43:56 +00:00
haya ded26ac3e4 Now cardbus_mapreg_unmap() has been implemented in
sys/dev/cardbus/cardbus_map.c.  The detech function in
sys/dev/cardbus/if_tlp_cardbus.c uses cardbus_mapreg_unmap().
2000-02-04 07:59:20 +00:00
thorpej 44a20a6c96 If we read a bad header signature, report what we read. 2000-02-03 06:47:31 +00:00
thorpej 001748dc57 First cut at detach support; doens't fully work yet. 2000-02-01 22:54:47 +00:00
haya 2e9b49c888 Force power off when a CardBus card is detached.
Use tsleep when kernel thread works.
2000-01-31 08:49:07 +00:00
haya 653eefc8f4 Add cardbus detach functionality. Add a function
cardbus_detach_card() in cardbus.c and enable detach code in cardslot.c
2000-01-26 09:04:59 +00:00
thorpej 422cc09430 First attempt at a CardBus front-end for the `ahc' driver. This will
support the Adaptec ADP-1480 CardBus SCSI cards, which are a stright
AIC-7860 implementation.
2000-01-26 06:37:23 +00:00
drochner 1f723151f2 use BUS_SPACE_MAP_PREFETCHABLE instead BUS_SPACE_MAP_CACHEABLE where the
PCI BAR bit is referred to
2000-01-25 22:32:20 +00:00
thorpej 701cc4b663 Add support for the Xircom X3201-3 in 21143 emulation mode. This chip
appears on some Xircom and Intel RealPort(tm) cards.

From Rafal Boni, with some slight modifications from me.
2000-01-25 21:50:30 +00:00
thorpej 6aca67041c Add a chip type for the Xircom X3201-3, and centralize the declaration
of the chip names array.
2000-01-25 19:29:17 +00:00
mycroft e33c595472 Do a CARDBUS_BM_ENABLE just to be sure. 2000-01-25 15:29:43 +00:00
thorpej be3c43687c Make sure the latency timer is set to a reasonable value.
From Masanori Kanaoka <kanaoka@ann.hi-ho.ne.jp>.
2000-01-25 03:44:27 +00:00
thorpej 0c93dded4a Use config_pending. Addresses kern/9247. 2000-01-24 18:34:44 +00:00
joda de798768b3 (cardbus_attach_card): zero out ca 2000-01-13 10:27:31 +00:00
augustss 6b1620b095 Remove extra #endif so we can compile again. 1999-12-17 14:06:43 +00:00
abs 43838a47fd Add back cut Cardbus_conf_write/cardbus_conf_write lines. 1999-12-16 21:04:10 +00:00
kleink 2fd74b0fb4 Normalize symbol names used for multiple inclusion protection. 1999-12-15 12:28:54 +00:00
thorpej 014cd3fcc1 Take a stab at making this work on big-endian systems. 1999-12-12 17:46:36 +00:00
explorer 4313f463a0 add 3com 575CT, which Dell (at least) seems to be shipping 1999-12-11 22:22:34 +00:00
thorpej d4bb1032cb Handle the 21143 PMCSR, like we do in the PCI front-end. 1999-12-11 00:39:13 +00:00
thorpej caae0e1aa1 - Don't try to run the chip in big-endian mode. Not all chips support
this consistently, and it doesn't always work even when the chip
  supports it.
- Make sure things DMA'd to the chip that the chip interprets are in
  little-endian mode.
1999-12-11 00:32:59 +00:00
thorpej 085bc011ab Add cardbus_get_capability(), cloned from pci_get_capability(). 1999-12-11 00:29:11 +00:00
joda 9758d8ed66 check for NULL from malloc 1999-12-08 16:52:51 +00:00
thorpej 546480874c After reading the 21143 manual again, make sure SNOOZE is cleared in
the CFDA register, too.
1999-12-07 07:36:19 +00:00
thorpej 6e36651a27 Add the 21143 PMCSR offset, from Masanori Kanaoka. 1999-12-07 07:33:25 +00:00