summaryrefslogtreecommitdiff
path: root/sys/dev/cardbus
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2005-01-16 19:46:02 +0000
committerBrad Smith <brad@cvs.openbsd.org>2005-01-16 19:46:02 +0000
commitae5a53f7ba054194a9114f26996c38f15b8d1185 (patch)
treee909f5998dc18e7ca2bd0d4d5455dd65f54002c1 /sys/dev/cardbus
parentbfe1398e83c40cd8f4a917f5c4eab1e0dd976386 (diff)
get EEPROM width on all cards except for the original PNIC
or XIRCOM cards. Based on the FreeBSD dc(4) driver.
Diffstat (limited to 'sys/dev/cardbus')
-rw-r--r--sys/dev/cardbus/if_dc_cardbus.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/dev/cardbus/if_dc_cardbus.c b/sys/dev/cardbus/if_dc_cardbus.c
index 3c2f10f0692..49ff799f68b 100644
--- a/sys/dev/cardbus/if_dc_cardbus.c
+++ b/sys/dev/cardbus/if_dc_cardbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_dc_cardbus.c,v 1.16 2005/01/14 15:04:52 brad Exp $ */
+/* $OpenBSD: if_dc_cardbus.c,v 1.17 2005/01/16 19:46:01 brad Exp $ */
#include <sys/param.h>
#include <sys/systm.h>
@@ -130,13 +130,17 @@ dc_cardbus_attach(parent, self, aux)
dc_cardbus_setup(csc);
+ /* Get the eeprom width, but XIRCOM has no eeprom */
+ if (!(PCI_VENDOR(ca->ca_id) == PCI_VENDOR_XIRCOM &&
+ PCI_PRODUCT(ca->ca_id) == PCI_PRODUCT_XIRCOM_X3201_3_21143))
+ dc_eeprom_width(sc);
+
switch (PCI_VENDOR(ca->ca_id)) {
case PCI_VENDOR_DEC:
if (PCI_PRODUCT(ca->ca_id) == PCI_PRODUCT_DEC_21142) {
sc->dc_type = DC_TYPE_21143;
sc->dc_flags |= DC_TX_POLL|DC_TX_USE_TX_INTR;
sc->dc_flags |= DC_REDUCED_MII_POLL;
- dc_eeprom_width(sc);
dc_read_srom(sc, sc->dc_romwidth);
dc_parse_21143_srom(sc);
}
@@ -166,8 +170,7 @@ dc_cardbus_attach(parent, self, aux)
sc->dc_type = DC_TYPE_AN983;
sc->dc_flags |= DC_TX_USE_TX_INTR|DC_TX_ADMTEK_WAR;
sc->dc_pmode = DC_PMODE_MII;
- dc_eeprom_width(sc);
- dc_read_srom(sc, sc->dc_romwidth);
+ /* Don't read SROM for - auto-loaded on reset */
}
break;
default: