aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/dc
diff options
context:
space:
mode:
authorMartin Blapp <mbr@FreeBSD.org>2003-02-07 23:12:51 +0000
committerMartin Blapp <mbr@FreeBSD.org>2003-02-07 23:12:51 +0000
commiteecb384463d83d62965de7bc3276d631d4248995 (patch)
treec92540fac02221d8738667887dfb7aee1e60efb5 /sys/dev/dc
parent801bb689ca8be76700b0c16c159683b5fa89472d (diff)
downloadsrc-eecb384463d83d62965de7bc3276d631d4248995.tar.gz
src-eecb384463d83d62965de7bc3276d631d4248995.zip
Fix the breakage resulting from Rev. 1.80. Get the eeprom width
for all but two cards. This should fix broken cards like these: DM9102 (Davicom, DEVICE_ID: 0x9002) DM9009 (Davicom, DEVICE_ID: 0x9009) DM9100 (Davicom, DEVICE_ID: 0x9100) 98713/98713_CP (Macronix PMAC, DEVICE_ID: 0x0512) 98713_CP (Macronix PMAC, DEVICE_ID: 0x0512) 987x5 (Macronix PMAC, DEVICE_ID: 0x0531) 98727 (Macronix PMAC, DEVICE_ID: 0x0532) 82C115 (Lite-On PNIC II, DEVICE_ID: 0xc115) AX88140A (ASIX Dev_ID: DEVICE_ID: 0x1400) EN1217 (Accton EN1217, DEVICE_ID: 0x1217) Note that these cards sould still work in STABLE. Reviewed by: imp
Notes
Notes: svn path=/head/; revision=110524
Diffstat (limited to 'sys/dev/dc')
-rw-r--r--sys/dev/dc/if_dc.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/dc/if_dc.c b/sys/dev/dc/if_dc.c
index 6de0972ec469..c3c740b42995 100644
--- a/sys/dev/dc/if_dc.c
+++ b/sys/dev/dc/if_dc.c
@@ -1955,13 +1955,17 @@ dc_attach(dev)
sc->dc_info = dc_devtype(dev);
revision = pci_read_config(dev, DC_PCI_CFRV, 4) & 0x000000FF;
+ /* Get the eeprom width, but PNIC and XIRCOM have no eeprom */
+ if (sc->dc_info->dc_did != DC_DEVICEID_82C168 &&
+ sc->dc_info->dc_did != DC_DEVICEID_X3201)
+ dc_eeprom_width(sc);
+
switch(sc->dc_info->dc_did) {
case DC_DEVICEID_21143:
sc->dc_type = DC_TYPE_21143;
sc->dc_flags |= DC_TX_POLL|DC_TX_USE_TX_INTR;
sc->dc_flags |= DC_REDUCED_MII_POLL;
/* Save EEPROM contents so we can parse them later. */
- dc_eeprom_width(sc);
dc_read_srom(sc, sc->dc_romwidth);
break;
case DC_DEVICEID_DM9009:
@@ -1982,7 +1986,6 @@ dc_attach(dev)
sc->dc_flags |= DC_TX_USE_TX_INTR;
sc->dc_flags |= DC_TX_ADMTEK_WAR;
sc->dc_pmode = DC_PMODE_MII;
- dc_eeprom_width(sc);
dc_read_srom(sc, sc->dc_romwidth);
break;
case DC_DEVICEID_AN985:
@@ -1993,7 +1996,6 @@ dc_attach(dev)
sc->dc_flags |= DC_TX_USE_TX_INTR;
sc->dc_flags |= DC_TX_ADMTEK_WAR;
sc->dc_pmode = DC_PMODE_MII;
- dc_eeprom_width(sc);
dc_read_srom(sc, sc->dc_romwidth);
break;
case DC_DEVICEID_98713:
@@ -2064,7 +2066,6 @@ dc_attach(dev)
sc->dc_flags |= DC_TX_INTR_ALWAYS;
sc->dc_flags |= DC_REDUCED_MII_POLL;
sc->dc_pmode = DC_PMODE_MII;
- dc_eeprom_width(sc);
dc_read_srom(sc, sc->dc_romwidth);
break;
default: