Add a flag for Ethernet@WireSpeed capability and correct chip revisions.
The idea was taken from OpenBSD and cross-referenced with Linux driver.
This commit is contained in:
parent
edc23a8104
commit
d0a4947e47
@ -2264,6 +2264,15 @@ bge_attach(device_t dev)
|
||||
sc->bge_asicrev = BGE_ASICREV(sc->bge_chipid);
|
||||
sc->bge_chiprev = BGE_CHIPREV(sc->bge_chipid);
|
||||
|
||||
/*
|
||||
* Don't enable Ethernet@WireSpeed for the 5700 or the
|
||||
* 5705 A0 and A1 chips.
|
||||
*/
|
||||
if (sc->bge_asicrev != BGE_ASICREV_BCM5700 &&
|
||||
sc->bge_chipid != BGE_CHIPID_BCM5705_A0 &&
|
||||
sc->bge_chipid != BGE_CHIPID_BCM5705_A1)
|
||||
sc->bge_flags |= BGE_FLAG_WIRESPEED;
|
||||
|
||||
if (bge_has_eeprom(sc))
|
||||
sc->bge_flags |= BGE_FLAG_EEPROM;
|
||||
|
||||
|
@ -2459,7 +2459,8 @@ struct bge_softc {
|
||||
uint32_t bge_flags;
|
||||
#define BGE_FLAG_TBI 0x00000001
|
||||
#define BGE_FLAG_JUMBO 0x00000002
|
||||
#define BGE_FLAG_EEPROM 0x00000004
|
||||
#define BGE_FLAG_WIRESPEED 0x00000004
|
||||
#define BGE_FLAG_EEPROM 0x00000008
|
||||
#define BGE_FLAG_MSI 0x00000100
|
||||
#define BGE_FLAG_PCIX 0x00000200
|
||||
#define BGE_FLAG_PCIE 0x00000400
|
||||
|
@ -915,13 +915,7 @@ brgphy_reset(struct mii_softc *sc)
|
||||
|
||||
brgphy_jumbo_settings(sc, ifp->if_mtu);
|
||||
|
||||
/*
|
||||
* Don't enable Ethernet@WireSpeed for the 5700 or the
|
||||
* 5705 A1 and A2 chips.
|
||||
*/
|
||||
if (bge_sc->bge_asicrev != BGE_ASICREV_BCM5700 &&
|
||||
bge_sc->bge_chipid != BGE_CHIPID_BCM5705_A1 &&
|
||||
bge_sc->bge_chipid != BGE_CHIPID_BCM5705_A2)
|
||||
if (bge_sc->bge_flags & BGE_FLAG_WIRESPEED)
|
||||
brgphy_ethernet_wirespeed(sc);
|
||||
|
||||
/* Enable Link LED on Dell boxes */
|
||||
|
Loading…
Reference in New Issue
Block a user