Commit Graph

52 Commits

Author SHA1 Message Date
perry 18db93c7f6 de-__P 2005-02-04 02:10:35 +00:00
mycroft 0515828a46 Now that all the silly string printing is gone, move the location where we
print a newline so it doesn't have to be done in every driver.
2004-08-10 18:43:49 +00:00
mycroft adbea3511a Enhance pcmcia_product_lookup():
* Remove the "expected function" value.  This was just causing problems with
  multifunction cards.  Differentiating the functions is better done by
  checking the function type (which we now do in ep and sm).
* Add support for matching CIS strings.  This necessitated changing the calling
  pattern a little too.

Use this enhanced version rather than driver-specific versions that do the
same thing.

Also, remove the last vestiges of PCMCIA_STR_*.
2004-08-10 18:39:08 +00:00
mycroft d11fb31edb More careful about cleaning up pointers. 2004-08-10 16:04:16 +00:00
mycroft 70ca4b2fa7 Print diagnostics in only one place if intr_establish() or function_enable()
fails.

Also, be a little more careful about passing up error values, and consistently
clear our interrupt handler pointer.
2004-08-10 15:29:56 +00:00
mycroft 8ccc950011 Copyright maintenance. 2004-08-10 08:56:08 +00:00
mycroft 285bec8287 Minor code reduction. 2004-08-09 20:30:19 +00:00
mycroft 9092e2c97e Make pcmcia_function_disable() primarily responsible for disabling the CCR
bits.  pcmcia_intr_disestablish() continues to do this as a stopgap.
2004-08-09 18:30:51 +00:00
mycroft 2ae40d3e4f Do our io_map()s and intr_establish()es earlier. 2004-08-09 18:11:01 +00:00
mycroft c8180f49fd Use PCMCIA_WIDTH_AUTO, not PCMCIA_WIDTH_IO16, since we (sometimes) do 8-bit
access.
2004-08-09 15:40:56 +00:00
mycroft ebed70c6e6 Remove the "offset" and "size" arguments to pcmcia_io_map(). In the singular
case (ne@pcmcia) where we were using these to create a subregion, it is better
handled by calling bus_space_subregion().

Now there is a 1:1 mapping between I/O spaces in the config table and windows
mapped in the function.  Rework the multifunction mapping code to take
advantage of this by using both I/O base addresses if necessary.
2004-08-08 23:17:12 +00:00
mycroft f61ec29665 Clean up attach messages. 2004-07-07 18:57:00 +00:00
thorpej b75a007d9f Add trailing ; to CFATTACH_DECL. 2002-10-02 16:51:16 +00:00
thorpej 71adb76f75 Use CFATTACH_DECL(). 2002-09-30 21:57:46 +00:00
thorpej f818766afe Declare all cfattach structures const. 2002-09-27 20:31:45 +00:00
lukem 06de426449 SIMPLEQ rototill:
- implement SIMPLEQ_REMOVE(head, elm, type, field).  whilst it's O(n),
  this mirrors the functionality of SLIST_REMOVE() (the other
  singly-linked list type) and FreeBSD's STAILQ_REMOVE()
- remove the unnecessary elm arg from SIMPLEQ_REMOVE_HEAD().
  this mirrors the functionality of SLIST_REMOVE_HEAD() (the other
  singly-linked list type) and FreeBSD's STAILQ_REMOVE_HEAD()
- remove notes about SIMPLEQ not supporting arbitrary element removal
- use SIMPLEQ_FOREACH() instead of home-grown for loops
- use SIMPLEQ_EMPTY() appropriately
- use SIMPLEQ_*() instead of accessing sqh_first,sqh_last,sqe_next directly
- reorder manual page; be consistent about how the types are listed
- other minor cleanups
2002-06-01 23:50:52 +00:00
christos 071d0cb34b Search for space to attach a 3c562d correctly. From Hayakawa Koichi
<haya@netbsd.org>, thanks.
2002-03-10 22:28:02 +00:00
christos 0e9f2d7a35 when we disable, we first disestablish the interrupt and then the card.
when we enable, we first configure the card and then establish the interrupt.
This is so that the ccr is mapped on multifunction cards.
2001-12-24 09:30:40 +00:00
lukem ab5d9d2b0c add RCSIDs 2001-11-13 07:24:43 +00:00
thorpej e00f3a5560 Remove unneeded include files. From Onno van der Linden. 2001-07-01 16:35:36 +00:00
augustss fd36bc02a6 Swap the order of disabling the function and disestablishing the interrupt
on detach.  This avoid accessing unmapped registers on multi-function cards.
2000-05-08 13:53:32 +00:00
cgd 49389b9817 tabbing consistency on the 3c1 entry 2000-03-13 23:36:02 +00:00
cgd 5402c76d3e add an entry to the product table for the 3C1. This seems to work,
at least as necessary to pull out the MAC address, etc.  Not actually
tested xmit & rcv yet.
2000-03-13 20:32:28 +00:00
enami c7573d517e - Bail out from attach stage if failed to enable card, number of iospace
or memspace is unexpected, failed to map iospace or failed to configure
the controller properly.
- Disestablish an interrupt handler if failed to enable card.
2000-02-08 12:49:12 +00:00
cgd 942a54e0c1 replace the *_lookup table entry match/lookup functions in all of
these drivers with a single common function (which supports tables
of variable-sized structures).  Things are mostly as they were before:
tables are terminated by entry with NULL name, etc.  There's also
the ability to call a driver-specific match function which can be used
to augment the table lookup.
2000-02-04 01:27:12 +00:00
augustss 82559ba682 Move detach operations around a little to simplify (and perhaps get it
right?).  Prompted by Jason, itojun and myself.
2000-02-02 08:41:00 +00:00
augustss ea45df4d30 Make sure to get rid of shutdown hook and ttach media on detach. 2000-02-02 08:00:21 +00:00
itojun af1d56129f wrap bpfdetach() with NBPFILTER > 0. 2000-02-02 07:47:33 +00:00
augustss 0151072444 Make ep driver detachable. 2000-02-02 07:23:28 +00:00
thorpej eda20693f0 Add support for the 3Com/Megahertz 3CCFEM556BI 10/100 Ethernet/Modem combo. 1999-10-11 17:49:21 +00:00
tron 3622436247 Add support for 3Com 3CXEM556B-INT as suggested by Noriyuki KOIZUMI in
PR kern/8188.
1999-08-14 13:43:02 +00:00
thorpej c9ee8bf3c4 Fix a couple of problems w/ 3c574 support. Doesn't quite work yet, but
it's a little closer.
1999-05-09 18:48:52 +00:00
marc b6a56aac7f add an entry to the products array for the
PCMCIA_PRODUCT_3COM_3CXEM556.

This device requires the same CCR hack as the 3c562.
1998-12-24 03:57:45 +00:00
thorpej 1d0f24882d Now that the *_activate() functions don't do things which are attachment
specific, move them into the chipset drivers.
1998-11-18 18:34:52 +00:00
thorpej 257d3e31ae Move the i/o window unmap and i/o space free into *_detach(). 1998-11-18 18:15:56 +00:00
thorpej d088902264 Add detach and activate entry points. Mostly functional except for
#ifdef notyet'd if_delref() and if_detach(), which will be fixed up
when that code is committed.
1998-11-17 20:44:02 +00:00
fvdl 7b10c3e7e4 Add the 'ex' driver, a DMA driver for 3Com 90x and 90xB cards. Rename
constants from EP_ to ELINK_ since they're now used in the ex driver as well.
1998-11-04 00:29:28 +00:00
thorpej 6bfd748b46 First-crack at RoadRunner (3c574-TX 10/100Mbps PCMCIA). Doens't yet use
any of the RoadRunner speed hacks.
1998-08-17 23:20:39 +00:00
thorpej 3ca5e496cc Fix a brain'o that caused the 3c589 to not match. 1998-08-15 16:09:46 +00:00
thorpej 4c88513d7d Look up the PCMCIA 3Com products in a table-driven fashion, like the
PCI products.
1998-08-15 07:25:15 +00:00
thorpej b170caf730 Completely rewrite media selection. Add support for the MII/PHY on
the 3Com 3c905-TX and 3c905-T4.  Fix handling of the MII on the
3c595-MII and 3c597-MII (can't talk to the PHYs on these cards; just
use "manual" for the external MII port).

Fixes kern/4782 (Chris Demetriou).
1998-08-12 18:51:52 +00:00
mellon 7a03c42491 Fix typo. 1998-07-20 02:17:17 +00:00
christos e3bc291504 Add a devlist2h.awk so that we don't sprinkle the same constants over
each device driver file and use it.
1998-07-19 17:28:15 +00:00
jonathan 011f2bda08 defopt NS, NSIP. 1998-07-05 06:49:00 +00:00
jonathan 3751946b97 defopt INET, NETATALK. 1998-07-05 00:51:04 +00:00
thorpej 5bc2217a49 Nuke __BROKEN_INDIRECT_CONFIG. 1998-06-09 07:24:55 +00:00
thorpej 5c85ae8778 Don't establish the interrupt handler just to read the MAC address. 1998-03-31 08:13:34 +00:00
christos 441bea9142 - more 3c562 magic; document that the 0x88 tuple only works in 3c562a-c
and not in d where it goes back to use the eeprom method. So we detect
  when the tuple method fails and fall back to the original method.
- even more 3c562 magic; the updated linux driver mentions that addresses
  0x??00-0x??7f only work instead of the previous...
1998-03-09 21:52:31 +00:00
marc b01ada14d9 fix up the power management code to dtrt with the 3c562A mfc card (and
hopefully the other variants)
1998-02-01 23:52:25 +00:00
marc 4a03c84731 change the initial loop condition not to round up if the iobase starts
<= 0x70
1998-01-11 22:22:12 +00:00