summaryrefslogtreecommitdiffstats
path: root/sys/dev/bge
diff options
context:
space:
mode:
authoryongari <yongari@FreeBSD.org>2010-10-05 23:24:58 +0000
committeryongari <yongari@FreeBSD.org>2010-10-05 23:24:58 +0000
commit91841f40b50423638c4883d92cfe40a7ebf039b0 (patch)
tree5927309da86617e801066f7ce1d9f874e6724b84 /sys/dev/bge
parent992be25328661f9de7bfc0cb133996e5fd0a7235 (diff)
downloadFreeBSD-src-91841f40b50423638c4883d92cfe40a7ebf039b0.zip
FreeBSD-src-91841f40b50423638c4883d92cfe40a7ebf039b0.tar.gz
Rearrange code a bit to correctly set PHY flags. This change make
it easy to add more newer ASICs. Obtained from: OpenBSD
Diffstat (limited to 'sys/dev/bge')
-rw-r--r--sys/dev/bge/if_bge.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c
index d7cba4b..e9d9e5c 100644
--- a/sys/dev/bge/if_bge.c
+++ b/sys/dev/bge/if_bge.c
@@ -2558,10 +2558,10 @@ bge_attach(device_t dev)
sc->bge_phy_flags |= BGE_PHY_5704_A0_BUG;
if (pci_get_subvendor(dev) == DELL_VENDORID)
sc->bge_phy_flags |= BGE_PHY_NO_3LED;
- if (pci_get_device(dev) == BCOM_DEVICEID_BCM5755M)
- sc->bge_phy_flags |= BGE_PHY_ADJUST_TRIM;
- if (BGE_IS_5705_PLUS(sc) &&
- !(sc->bge_phy_flags & BGE_PHY_ADJUST_TRIM)) {
+ if ((BGE_IS_5705_PLUS(sc)) &&
+ sc->bge_asicrev != BGE_ASICREV_BCM5906 &&
+ sc->bge_asicrev != BGE_ASICREV_BCM5785 &&
+ sc->bge_asicrev != BGE_ASICREV_BCM57780) {
if (sc->bge_asicrev == BGE_ASICREV_BCM5755 ||
sc->bge_asicrev == BGE_ASICREV_BCM5761 ||
sc->bge_asicrev == BGE_ASICREV_BCM5784 ||
@@ -2569,7 +2569,9 @@ bge_attach(device_t dev)
if (pci_get_device(dev) != BCOM_DEVICEID_BCM5722 &&
pci_get_device(dev) != BCOM_DEVICEID_BCM5756)
sc->bge_phy_flags |= BGE_PHY_JITTER_BUG;
- } else if (sc->bge_asicrev != BGE_ASICREV_BCM5906)
+ if (pci_get_device(dev) == BCOM_DEVICEID_BCM5755M)
+ sc->bge_phy_flags |= BGE_PHY_ADJUST_TRIM;
+ } else
sc->bge_phy_flags |= BGE_PHY_BER_BUG;
}
OpenPOWER on IntegriCloud