1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-14 10:09:48 +00:00

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:
Jung-uk Kim 2008-01-18 22:09:50 +00:00
parent 248e52ada8
commit 86543395c1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=175466
3 changed files with 12 additions and 8 deletions

View File

@ -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;

View File

@ -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

View File

@ -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 */