Commit Graph

158 Commits

Author SHA1 Message Date
Warner Losh
3703310002 Buffalo LPC4/CLX ID 2005-10-11 01:04:16 +00:00
Warner Losh
d0948af5ae New OEM generic card. "10/100 Fast Ethernet PC Card". It has a
generic sounding CIS "PCMCIA", "FAST ETHERENT CARD" and a bogus MANFID
code (0xffff and 0x1090).  However, since I'm not aware of 'generic'
cards that aren't NE-2000oids, go with that and hope for the best.
2005-10-11 01:02:16 +00:00
Warner Losh
6ec4c010b5 Remove debug that crept in.. 2005-10-05 05:24:35 +00:00
Warner Losh
95a2adef58 MFp4:
o Add support for Tamarack TC5299J + MII found on SMC 8041TX V.2
	  and corega PCCCCTXD
	o Add support for ISA/PCI RTL80[12]9 chips
	o Improve support for the ax88790 based
	o minor code movement

Submitted by: (#2) David Madole
2005-10-05 05:21:07 +00:00
Warner Losh
e51bf22777 Emit a warning when a card matches multiple entries in our table. A
number of cards have been discovered to be matching on the strings of
the cis rather than manufacturer/product id for cards we already had a
prod id for.  This is a result of getting the list from the NetBSD
driver which also includes the OID for the cards where such a
distinction mattered (since it was tested against the MAC address we
got from the card).  Since we do not try to match OIDs, we do not need
the extra entries and they just waste space.

I'm guessing that some of the dlink entires (DE-660, DE-660+) and many
of the corega cards may fall into this boat and can safely be removed.
2005-09-26 18:27:13 +00:00
Warner Losh
c4a4b66d17 I have confirmed with my Epson EEN10B that it needs to look at the
attribute memory at 0xff0 to find its MAC address.  This is another
instance of the IBM ethercard II from all apperances (short of popping
the lid).  Update the entry to document which cards we support
actually need this functionality.
2005-09-24 17:36:43 +00:00
Warner Losh
c1a8a7110a The DLink DE650 has the same ID as Linksys EthernetCard, so we don't
need a sperate entry for it.
2005-09-24 17:32:20 +00:00
Warner Losh
829681b6aa Remove obsolete include 2005-09-23 21:59:11 +00:00
Warner Losh
62e428c42e MFp4:
o eliminate the ED_NO_MIIBUS option.  Now, you need miibus to use ed with
  pccard.  If you have an old ISA or PCI card w/o a miibus, then you'll still
  be able to use the ed driver w/o miibus in the kernel.  If you have pccard
  you'll need mii now.  Most pccards these days have miibus, and many
  cards have ISSUES if you don't attach miibus.  issues I don't want to
  constantly rediagnose.
  - Add new media_ioctl, mediachg and tick function pointers.  The core
    driver will call these if they aren't NULL, or return an error if they
    are.
  - migrate remaining mii code into if_ed_pccard.
o include some notes from my datasheet fishing.  this may allow us to
  get media status from some pccards.
o Fix one bug that's common to many drivers.  call if_free(ifp) after
  we tear down the interrupt.  ed_intr() depends on ifp being there and
  freeing it while interrupts can still happen is, ummm, bad.
2005-09-18 20:51:34 +00:00
Warner Losh
4062f4e78e When stopping the card, and returning to page 0, it is best if you do
that with the NIC set of registers rather than the ASIC registers.  I
believe this was a harmless oversight, since we set ED_P0_CR to the
same value 5ms later, but just to be safe...
2005-09-15 04:05:09 +00:00
Warner Losh
d21d33847c MFp4: Omnibus ed changes
o Attach AX88x90's MII bus to system, and require its presence.
o Reorg the mii code a little, and move more of it into pccard attachment.
o Eliminate ed_pccard_{read,write}_attrmem in favor of a more appropriate
  function in the pccard layer.
o Update comments to reflect knowledge gained.
o Update how re recognize a NE-2000 ROM.  I found a couple of different
  datasheets that define the structure of the PROM data, so the code's
  old heuristics have been removed, and comments updated to reflect the
  structure.
o Eliminate work around for EC2T.  It is no longer needed, and was wrong
  headed since the EC2T has a Winbound 82C926C in it, not a AX88x90.
o Add copyright to if_ed_pccard.c, since I believe I've re-written more than
  3/4 of it.

# With these changes, all of my 20-odd ed based cards work, except for the
# NetGear FA-410, and I'm pretty sure that's a MII/PHY problem.
2005-09-13 19:47:44 +00:00
Warner Losh
5098c3916e MFp4: Minor formatting nits in pccard table. 2005-09-13 19:09:57 +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
c16a45fc5b Add note about what ED_DEFAULT_MAC_OFFSET applies to 2005-09-08 17:16:23 +00:00
Warner Losh
63f90381e9 Consistancy is the hobgoblin of small minds:
o DLINK -> DL100XX
2005-09-07 03:34:24 +00:00
Warner Losh
f2e03f728c Minor reorg of pccard attach code to fix ax88x90 case broken after fixing
dl100xx case.
o We no longer acquire and release resources during attach many times.  We now
  do it once at the beginning.
o Move setting the resource offsets to just after acquiring the ports in
  attach.
o Move ax88x90 code to the end of the file, just after the dl100xx specific
  code.
o Rename ed_pccard_Linksys to ed_pccard_dl100xx to reflect the underlying
  chipset.
o Pass the ed_product structure into ed_pccard_{dl100xx,ax88x90} and have
  those routines test the flags to see if this card should be probed in that
  way.
o transition from ed_probe_Novell to ed_probe_Novell_generic since we already
  have the resources setup.
o Move use of ed_probe_Novell_generic into ed_pccard_dl100xx to be more
  consistant with ax88x90 case.
o simplify the code where we probe for the chipsets
2005-09-07 03:30:58 +00:00
Warner Losh
56013d44db Fix DL100xx based cards. Don't drop resources. It was approrpiate in
the probe code that this used to be part of, but as part of the
attach, we shouldn't be dropping the resources here.

Also, allocate the proper rid in the ax88x90 setup.
2005-09-07 00:00:16 +00:00
Warner Losh
6942fac077 move away from K&R function definitions 2005-09-06 23:15:21 +00:00
Warner Losh
79e277f155 Work around a bug I've seen on Linksys EC2T cards. For some reason,
as yet unknown, those cards report their MAC address a byte at a time.
However, other AX88x90 cards report the MAC address a word at a time.
Add a heuristic which looks at the high order bytes of the first 6
words.  If they are all '0', assume the card is behaving like the
Linksys EC2T card.  Since the default prefix for these cards appears
to be 00:e0:98, this appears to be a safe heuristic.  While some cards
have been observed with different prefixes, they all work with this
heuristic.

I'm unsure if this is a bug in the EC2T card, or if it is a bug in the
initialization of the card.  No other OS has this heuristic (although
w/o it, the MAC address that is used works).
2005-09-06 22:55:32 +00:00
Warner Losh
e10a8107c6 Go ahead and | in ED_CR_PAGE_0, even though this doesn't change things
at all.  It makes the code clearer.

fix a comment comments about why we need to write i/o address to certain
registers.
2005-09-06 22:46:41 +00:00
Warner Losh
15a38fff14 It turns out that many of the ambicom cards have their CIS resources
listed in different orders.  Since it is easy to identify the Modem
resources vs the Ethernet resources by looking at the size, use that
rather than hard coded rids.  For such parts, go ahead and guess which
rid we should use based on the size.  This guess appears reliable for
the two example cards that I have with different CIS info.
2005-09-06 22:44:26 +00:00
Warner Losh
16e16d771c At some point in the past, we read the PROM by words. Now we read
PROM by bytes.  Adjust the extraction of the MAC address from this data
to reflect this change.

This gets the AX88x90 based PC Cards MAC address working again (my
UMAX Ethernet and Linksys EC2T cards now work).

MFC After: 3 days
2005-09-01 20:08:24 +00:00
Warner Losh
f1c4694df3 Finish conversion to bus space and make ed MP safe.
o Lock ed
o Fix extra newline in probe messages
o Eliminate gone.
o Make detach less-racy.
o Eliminate spl*
o Switch from timeout/untimeout to callout interface.
o Read/write card memory using bus_space calls.
o generalize readmem so that we don't need ifs in the code.
o Fix memory stuff to be consistant.
o Remove OLDCARD compat stuff.
o Mark interrupt as MPSAFE.

# sic, hpp not tested at all
# ISA and PCI attachments lightly tested
2005-08-28 23:56:25 +00:00
Warner Losh
33d6891bc8 Add support for the DLink DMF650TX Ethernet+56k modem PC Card. This
gets the ethernet part of the card working, while putting appropriate
hooks in place for the modem code.  Other ed based lan/modem combo
cards should be easy to add.  Please send me info on any you'd like to
see support added.

Note: The 650 isn't a strictly conforming multi-function card, so
special support is needed. :-(
2005-07-15 01:54:59 +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
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
Brooks Davis
fc74a9f93a Stop embedding struct ifnet at the top of driver softcs. Instead the
struct ifnet or the layer 2 common structure it was embedded in have
been replaced with a struct ifnet pointer to be filled by a call to the
new function, if_alloc(). The layer 2 common structure is also allocated
via if_alloc() based on the interface type. It is hung off the new
struct ifnet member, if_l2com.

This change removes the size of these structures from the kernel ABI and
will allow us to better manage them as interfaces come and go.

Other changes of note:
 - Struct arpcom is no longer referenced in normal interface code.
   Instead the Ethernet address is accessed via the IFP2ENADDR() macro.
   To enforce this ac_enaddr has been renamed to _ac_enaddr.
 - The second argument to ether_ifattach is now always the mac address
   from driver private storage rather than sometimes being ac_enaddr.

Reviewed by:	sobomax, sam
2005-06-10 16:49:24 +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
711c07db68 Fix the support for the ax88[17]90 to print the right type, rather
than the generic ne-2000 string.  This should have no effect on the
actual support of the parts, just reporting what the part was.

Also, rename a few functins and symbols to reflect a more generic
part support that grew out of the early specific support.
2005-02-17 18:15:13 +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
3302cab184 Rework DL10019/DL10022 support. This tries to reset things in a more
proper way, or at least the same way that NetBSD and Linux do things
(I've been unable to obtain datasheets for these parts to know for
sure).  This has some marginal improvement in the DL10022 and DL10019
cards that I have.  Also, report which type, exactly.

# There's one or two ed cards that I have which still don't work, but I think
# that's due to MII losage on the card that's not presently compensated
# for in the MII drivers.
2005-02-14 06:54:06 +00:00
Warner Losh
f3fe05f878 MFp4: Merge in AX88790 support from my p4 tree. I've had this in my
tree since 2003/02/20, and I recently cleaned it up.  I'd even closed
the PR that I obtained this from Fri Jul 18 23:25:08 MDT 2003 since
I looked at my p4 tree.

PR: 46889
Submitted by: HASEGAWA Tomoki
2005-02-14 06:47:22 +00:00
Warner Losh
ec54f56441 Improve the mining of MAC address from the card:
o Add a fallback location for the MAC address.  Most of the early ne2000
  PC Cards were built from the same parts, so most of them have the same
  address in the CIS to grab the MAC from.  Use this address as our
  fallback if we don't find anything better.
o Add printf, in bootverbose, noting the MAC addresses that we find along
  the way.

# Better sanity checking of the MAC address is needed.  Will have to
# investigate using/creating a centralized function to do this as a number
# of other PC Card drivers each have their own ad-hoc tests.
2005-02-12 16:44:15 +00:00
Warner Losh
1d0fc8fda7 Add comment about MAC mining 2005-02-12 08:27:46 +00:00
Warner Losh
c5377c2c88 Really old PCMCIA cards stored the MAC address in the attribute memory
at some offset.  Unlike newer cards, the MAC address wasn't part of
the CIS as a specific FUNCE.  These older cards were having their MAC
address show up as 0:2:4:6:8:a because that's what's in the ROM
locations that would be there in a real ne2000.

This patch allows one to specify the offset for the MAC address for
these cards.  Specify one for the IBM Ethernet II card, as it is one
that has this problem.  One shouldn't specify this unless the MAC
address really isn't in the CIS at all.

Side note: The novell probe likely shouldn't read the MAC address, and
that should be moved to the bus specific attach routine(s), maybe as a
convenience function in if_ed_novell.c.

My IBM Ethernet II (aka Info Mover) now has a believable MAC address.
2005-02-12 00:45:22 +00:00
Warner Losh
bd019eb78c Eliminate the ED_VENDOR_{PCCARD,LINKSYS} types. These cards really
are NOVELL NE2000 with just a tiny quirk that's non vendor specific.
Instead, use the chip_type of DL100XX instead.  This is more inline
with how the AX88190 support was added, and seems a little cleaner.
2005-02-11 06:02:27 +00:00
Warner Losh
940e7b9e51 o Remove duplicate LINKSYS ETHERFAST entry.
o The COMBO_ECARD comes in many flavors, it seems, so probe both the DL10019
  and the AX88x90 on it.  Since this seems to work with no ill effects, maybe
  the probing should happen more generally rather than being table driven.
  Need to think more about this.
o Remove PCM100 because it is duplicative (the ETHERFAST is the pcm100 and
  apparently has the same IDs).  It was here for NetBSD because they match
  up an expected MAC address OID, but since we don't bother with that, we
  don't need to be so finely discriminating.
o Minor style nit.
2005-02-09 06:03:36 +00:00
Warner Losh
9d512034e3 Make it possible to unload ed. Move the ed_pccard_detach routine to
if_ed and rename it to ed_detach().  Tell other busses to use this
routine for detach.

Since I don't actually have any non-pccard ed hardware I can test
with, I've only tested with my pccards.

More improvements in this area likely are possible.

Prodded by: rwatson
2005-02-08 05:45:35 +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
Robert Watson
645674fb54 Remove unused static declaration of ed_pccard_dl100xx(), which probably
accidentally snuck into a prior commit to if_ed, and prevented building
with -Werror.

Pointed out by:	csjp
2005-01-26 14:09:32 +00:00
Warner Losh
b660732977 Kill stray debugging line not fully removed 2005-01-26 05:40:37 +00:00
Warner Losh
0158a52468 Rework how we deal with the DL10019 and DL10022 cards (as well as the
AX88190 ones, but that one only minorly):
	o don't set flags in the match routine.  They appear to be cleared
	  when probe/attach is called.  Before this change, they were
	  always treated as a simple ne2000, which would fail to get the
	  right NIC address.
	o Lookup device again in the probe routine and probe based on the
	  cards that you see.
	o Detect and report the DL10022 seprately from the DL10019 cards.

While I'm here:
	o remove a bad printf
	o change another bad printf to device_printf.
	o minor style(9) formatting tweaks.

# note: a lot of OEM entries are in the ed_pccard_products such that we can
# likely remove, or collapse, many of them.

This makes all of my DL100xx cards at least probe the ethernet address
correctly, which it wasn't doing before.  I can't seem to locate my
AX88xxx based cards, so those haven't been tested, but they were
busted before the change so they can't be any worse now...
2005-01-26 05:21:12 +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
f52dffcb2a Use DIGITAL2 for DEPCM card 2005-01-25 18:50:25 +00:00
Warner Losh
102e51ce42 Remove obsolete comment from head this time. The RELENG_5 commit was
accidental, but harmless and correct so I'll not be reverting it unless
there's some hidden damage I can't see right now...
2005-01-25 04:45:25 +00:00
Warner Losh
c106422ff7 Add MagicRAM PC Card Ethernet as ne2000 clone 2005-01-25 02:50:58 +00:00
Warner Losh
0409a8c387 Only attach to network functions. 2005-01-20 19:37:22 +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
Warner Losh
54df531327 Rumor has it that ACCTON EN2216 is also an ne2000 compatible. Make it so. 2004-10-20 04:54:50 +00:00
Warner Losh
6d69b36945 It is a little better to return ENXIO from probe/match routine than EIO. 2004-07-21 20:38:12 +00:00
Warner Losh
2e31e339d1 Fix disordering of pccarddevs.h noticed by bde. Also remove a few
redundant includes and fix some of the include disordering.

Submitted by: bde
2004-05-27 03:49:45 +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
fbfb97942e It turns out that the module dependency on pccard is in error. Since
there's not dependencies on pccard symboles, such a dependency is not
necessary.  This means that drivers that have multiple attachments can
not drag bogus devices into the kernel at load time.

We can't (yet) do this with pci and isa.  Drivers written for them
actually do seem to have symbols that depend on these busses'
implementation code.

ndis not touched until other things can be tested.
2004-05-08 06:04:06 +00:00
KATO Takenori
38816a4377 Added TDK LAK-CD031 (simple NE2000 device).
Reviewed by:	imp
2003-12-31 04:25:00 +00:00
Brooks Davis
9bf40ede4a Replace the if_name and if_unit members of struct ifnet with new members
if_xname, if_dname, and if_dunit. if_xname is the name of the interface
and if_dname/unit are the driver name and instance.

This change paves the way for interface renaming and enhanced pseudo
device creation and configuration symantics.

Approved By:	re (in principle)
Reviewed By:	njl, imp
Tested On:	i386, amd64, sparc64
Obtained From:	NetBSD (if_xname)
2003-10-31 18:32:15 +00:00
Warner Losh
1bbd0d4010 EXPsys PCMCIA Ethernet Combo
Submitted by: Ludwig Pummer
2003-09-20 18:03:07 +00:00
Warner Losh
42967c7c5f Add MELCO LPC3_CTX. This is the same as Buffalo card of the same name
with different vendor id.

Submitted by: Shizuka Kudo-san
2003-08-07 19:40:05 +00:00
Warner Losh
373eec79d1 The LP_ETH_10_100_CF entry needs to be tagged as a DL100019.
Submitted by: Scott Renfro
2003-07-28 00:07:58 +00:00
Warner Losh
b44e6aad52 Add Socket Communications Low Power 10/100 CF Ethernet card.
Obtained from: NetBSD (information, not code)
2003-07-26 17:52:09 +00:00
Warner Losh
58a67e33be Add support for BUFFALO LPC3-CLX 10/100Base-T PC-Card
PR: 47786
Submitted by: IHA, genta -san
2003-07-19 05:36:09 +00:00
Matthew N. Dodd
f246e4a17f - Express hard dependencies on bus (pci, isa, pccard) and
network layer (ether).
- Don't abuse module names to facilitate ifconfig module loading;
  such abuse isn't really needed.  (And if we do need type information
  associated with a module then we should make it explicit and not
  use hacks.)
2003-04-15 06:37:30 +00:00
Warner Losh
cb339c7cd9 SMC 8041 is the same thing as LINKSYS COMBO_ECARD, so no extra entry
is required.  NetBSD has one because it checks for the mac address
match as well wanting to give its own string in the description.
Since we do neither, we don't need a separate entry.

# I suspect that a few of the COREGA cards might fall into that category
# as well, but since I don't have access to any of them it is hard to know
# for sure.
2003-04-10 07:35:19 +00:00
Warner Losh
843aa7b528 Add Billionton CFLT10N and SMC8041 (although I'm not 100% sure the latter is
needed).  Remove duplicate kingston kne2 entry.

Info obtained from NetBSD
2003-04-10 07:24:18 +00:00
Warner Losh
227e700639 reorganize the supported card table. We don't need the enet_vendor or
enet_mcast fields, so remove them.  Sort.  Eliminate now duplicate
entries.

This reorg saves about 500 bytes in the binary.  I've tested this only
with a couple of cards, so please let me know if I've broken anything.
2003-04-10 07:04:39 +00:00
Warner Losh
649a9521d5 Don't set the description if NULL. 2003-04-10 06:08:27 +00:00
MIHIRA Sanpei Yoshiro
e0926f607f Add NE2000DVF_AX88190 flag to Corega FEther PCC-TXD
(see also /etc/defaults/pccard.conf rev.1.172)
2003-04-04 14:46:50 +00:00
Takeshi Shibagaki
5770575cfc Add BUFFALO LPC-CF-CLT(10Base-T Compact Flash Ether Card). 2003-01-18 02:14:23 +00:00
Sam Leffler
673d91916d network interface driver changes:
o don't strip the Ethernet header from inbound packets; pass packets
  up the stack intact (required significant changes to some drivers)
o reference common definitions in net/ethernet.h (e.g. ETHER_ALIGN)
o track ether_ifattach/ether_ifdetach API changes
o track bpf changes (use BPF_TAP and BPF_MTAP)
o track vlan changes (ifnet capabilities, revised processing scheme, etc.)
o use if_input to pass packets "up"
o call ether_ioctl for default handling of ioctls

Reviewed by:	many
Approved by:	re
2002-11-14 23:54:55 +00:00
Warner Losh
43924d99c2 add some devices from NetBSD 2002-10-11 07:03:09 +00:00
Warner Losh
11b0ee113b integrate from p4 repo:
o Honor NE2000DVF_{AX88190,DL10019} flags by setting the ED_FLAGS_xxxx
  flag.
o Mark linksys combo_ecard as ax88190
o Set the type_str to AX88190 for the ax88190 cards.

This fixes ax88190 based cards, for the most part, but doesn't seem to fix
the mii based dl10019 cards (aka linksys cards).
2002-07-22 21:28:46 +00:00
Warner Losh
990fa6b68a More newcard devices:
Netgear FA-410TXC
	Netgear FA-411
	Lantech Fastnet TX
	Linksys pcm100
Hide the total wildcard device for SVEC too :-(

Obtained from: NetBSD/OpenBSD
2002-04-02 05:52:52 +00:00
Warner Losh
2781c18f63 Add EDIMAX ethernet card for NEWCARD from NetBSD 2002-01-29 07:08:56 +00:00
Warner Losh
67bac73ca9 Comment out some bogus entries. somehow they match everything, which
is bad.  I need to correct pccarddev, but I'm not sure how just at the
moment.  So I'm firewalling the damage.
2001-11-20 06:18:36 +00:00
Warner Losh
45c2a3ca28 MF NetBSD's if_ne_pcmcia.c rev 1.82's list of devices 2001-11-15 08:15:44 +00:00
Warner Losh
9de4df498c Migrate to PCMCIA_CARD() macros 2001-11-15 07:52:49 +00:00
Warner Losh
269b3a8211 s/PCCARD_/PCMCIA_/g in NEWCARD device tables to enable easier NetBSD sharing 2001-11-11 20:17:10 +00:00
Ian Dowse
9b04180c2c Add an option ED_NO_MIIBUS, which causes the `ed' driver to be
built without support for miibus PHYs. Most ed cards don't need
miibus support, so it's useful to be able to avoid the bloat of
all the mii devices for small fixed-purpose kernels.
2001-09-29 22:32:03 +00:00
Ian Dowse
2cc42e154e Remove an old hack that remembered if the card type was Linksys by
storing a flag in the global variable 'linksys' during the probe
routine and reading it during the attach routine. We now have the
ED_VENDOR_LINKSYS vendor code stored in sc->vendor, so check that
instead.
2001-07-22 21:31:44 +00:00
Ian Dowse
dc53090488 Attach the miibus for Linksys/Dlink cards from the attach routine,
not from the probe routine. This was an oversight when I originally
ported the miibus support to -current, though it was mostly harmless.

We now set the vendor code to the new value ED_VENDOR_LINKSYS in
ed_pccard_Linksys() at probe time. Then ed_pccard_attach() checks
the vendor code, and sets up the miibus if appropriate.

Reviewed by:	imp
2001-07-22 18:58:44 +00:00
Warner Losh
f2fdbb57ca Add support for Dlink DL10022 to the ed driver. This is a mii part
bolted to a ne-2000 chip.  This is necessary for the NetGear FA-410TX
and other cards.

This also requires you add mii to your kernel if you have an ed driver
configured.

This code will result in a couple of timeout messages for ed on the
impacted cards.  Additional work will be needed, but this does work
right now, and many people need these cards.

Submitted by: Ian Dowse <iedowse@maths.tcd.ie>
2001-03-03 08:31:37 +00:00
Warner Losh
012b895034 Add a bunch of entries from NetBSD's if_ne_pcmcia.c v1.67. We still
need to verify that all the entries in pccard.conf are present in this
table.
2001-01-21 08:20:23 +00:00
Garrett Wollman
0a2c3d48c6 select() DKI is now in <sys/selinfo.h>. 2001-01-09 04:33:49 +00:00
Warner Losh
cc9e9343cd Minor newbus/style(9) cleanups.
o Move the ax88190 code to its own function.
o Move all device_method_t, driver_t and DRIVER_MODULE definitions to the
  end of files.
o Wrap a few lines > 80 characters.
o Use the same devclass for all ed drivers.  This allows machines with
  multiple types of cards to have their cards numbered correctly.  Before,
  you could wind up with two ed0's.
o Protect if_edvar.h from multiple includes because I was there.
2000-12-26 06:38:04 +00:00
Toshihiko ARAI
d556784aa3 Linksys Fast Ethernet PCCARD cards supported by the ed driver now
require the addition of flag 0x80000 to their config line in
pccard.conf(5).  This flag is not optional.  These Linksys cards will
not be recognized without it.

Reviewed by:    imp, iwasaki
2000-12-18 15:28:53 +00:00
Warner Losh
95b2cbbc17 Call ed_probe_Novel in the AX88190 case as well.
Remove stary blank line.

Submitted by:	Seigo Tanimura <tanimura@r.dl.itc.u-tokyo.ac.jp>
2000-12-17 18:15:15 +00:00
Warner Losh
3a68d6087a Fix problem with ax88190 based cards trying to probe further after
matching the ax88190.
2000-12-13 06:27:23 +00:00
Peter Wemm
5e12cd9b80 Argh, I have fixed this cut/paste error twice before. I must have
committed the wrong patch. :-(  sn_pccard_products[] should have
been static anyway.
2000-11-25 07:25:08 +00:00
Peter Wemm
b3d39a56ae Update the ed driver to probe and attach under a NEWCARD kernel (I was
using a cardbus based system with pccbb providing the pcic interface).
Something isn't quite right.. when the driver allocates and activates
its resources, the IO space that was requested reads as all zeros (versus
the original 0xff's as it normally is when there is no device responding).

Also, deactivate the resources before releasing them.  OLDCARD doesn't
seem to care but NEWCARD/CARDBUS get rather unhappy if you release
a resource that hasn't been deactivated yet.

Make pcic_p.c only compile with oldcard kernels.
2000-11-25 03:36:09 +00:00
Mike Smith
1b97a6c6a9 Network modules are all "if_foo" not "foo". Avoid the confusing spew that
ensues when ifconfig tries to load if_ed.ko when it's already in the kernel.
2000-10-15 20:23:27 +00:00
Poul-Henning Kamp
db7e3af111 Remove unneeded #include <machine/clock.h> 2000-10-15 14:19:01 +00:00
Seigo Tanimura
0593938b26 Allocate memory resource to access the attribute memory of a card.
Reviewed by:	imp
2000-09-25 06:01:42 +00:00
Paul Saab
6004db96ae Move the detection of Linksys PCMCIA cards from attach to probe.
This should solve the problems people were seeing with this driver.

Reported by:	phk & others.
2000-09-12 11:03:12 +00:00
Yoshihiro Takahashi
82583dd564 - Fixed the conversion to bus_space interface.
- Added PC-98 Cbus devices support.
  The original patch is submitted by chi@bd.mbn.or.jp (Chiharu Shibata)
- Removed old ed driver.
2000-08-17 12:15:45 +00:00
Seigo Tanimura
8f4fec9c36 Newbusify ed driver.
Partly submitted by:	alex
2000-08-14 04:31:07 +00:00
Seigo Tanimura
eecdc4415b MFPAO: Add support for AX88190, equipped in MELCO LPC3-TX. 2000-07-23 15:15:43 +00:00
Archie Cobbs
21b8ebd926 Make all Ethernet drivers attach using ether_ifattach() and detach using
ether_ifdetach().

The former consolidates the operations of if_attach(), ng_ether_attach(),
and bpfattach(). The latter consolidates the corresponding detach operations.

Reviewed by:	julian, freebsd-net
2000-07-13 22:54:34 +00:00
Paul Saab
898e18b849 Only try to detect Linksys PCMCIA cards when we are in a pccard
environment.  This fixes the breakage to ISA ethernet cards.

Reviewed by:	peter
2000-06-29 07:31:37 +00:00
Warner Losh
16ec9f077e sanpai-san (sanpai@sanpai.org) suggested that we put the novel probe
first.  This will fix a few cards that hang on the WD probe.  He tells
me that PAO went one step farther and removed the WD proble completely
and none of the cards in the 2.x database broke in PAO3.  Since I'm
more conservative in this code, I'm just swapping the order, which he
said also fixed his problem.

Reviewed by: mdodd, iwasaki
Submitted by: sanpai@sanpai.org
2000-04-28 05:01:35 +00:00
Warner Losh
3f994c78d5 Remove unloaded printf. We do this now in the newbus layer. 2000-04-17 04:39:38 +00:00
Tatsumi Hosokawa
87ef0a0afb Propagate MAC address in CIS tupple to dev/ed/ driver.
Many ed-based Ethernet PC-cards can't get correct MAC address without
this patch.

Submitted by: Takanori Watanabe <takawata@shidahara1.planet.sci.kobe-u.ac.jp>
Reviewed by: Warner Losh <imp@village.org>
2000-01-21 03:08:46 +00:00