diff options
author | mbr <mbr@FreeBSD.org> | 2003-02-07 23:12:51 +0000 |
---|---|---|
committer | mbr <mbr@FreeBSD.org> | 2003-02-07 23:12:51 +0000 |
commit | 6d1daa2399cd63a0a75a17b6032a37b9079ae1b3 (patch) | |
tree | c92540fac02221d8738667887dfb7aee1e60efb5 /sys/dev/dc/if_dc.c | |
parent | e8f2dea5ddc06968c8deacd684154cd56b9664ff (diff) | |
download | FreeBSD-src-6d1daa2399cd63a0a75a17b6032a37b9079ae1b3.zip FreeBSD-src-6d1daa2399cd63a0a75a17b6032a37b9079ae1b3.tar.gz |
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
Diffstat (limited to 'sys/dev/dc/if_dc.c')
-rw-r--r-- | sys/dev/dc/if_dc.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/dc/if_dc.c b/sys/dev/dc/if_dc.c index 6de0972..c3c740b 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: |