summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryongari <yongari@FreeBSD.org>2011-05-05 00:43:40 +0000
committeryongari <yongari@FreeBSD.org>2011-05-05 00:43:40 +0000
commitd9965014f1672d4b4850e18033e5a551b024d5bd (patch)
tree0c8dc411a1d7e8780ff4d5299df2a02d83e2677d
parent64f3736572271b799837f8b28cb8b3c95ca9be0f (diff)
downloadFreeBSD-src-d9965014f1672d4b4850e18033e5a551b024d5bd.zip
FreeBSD-src-d9965014f1672d4b4850e18033e5a551b024d5bd.tar.gz
Enable Ethernet@WireSpeed for BCM5718/BCM57765 family. While I'm
here inverse meaning of PHY flag as Ethernet@WireSpeed is enabled for most PHYs.
-rw-r--r--sys/dev/bge/if_bge.c12
-rw-r--r--sys/dev/bge/if_bgereg.h2
-rw-r--r--sys/dev/mii/brgphy.c2
3 files changed, 8 insertions, 8 deletions
diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c
index d28844a..ed79ba3 100644
--- a/sys/dev/bge/if_bge.c
+++ b/sys/dev/bge/if_bge.c
@@ -2769,12 +2769,12 @@ bge_attach(device_t dev)
* Don't enable Ethernet@WireSpeed for the 5700, 5906, or the
* 5705 A0 and A1 chips.
*/
- if (sc->bge_asicrev != BGE_ASICREV_BCM5700 &&
- sc->bge_asicrev != BGE_ASICREV_BCM5906 &&
- sc->bge_chipid != BGE_CHIPID_BCM5705_A0 &&
- sc->bge_chipid != BGE_CHIPID_BCM5705_A1 &&
- !BGE_IS_5717_PLUS(sc))
- sc->bge_phy_flags |= BGE_PHY_WIRESPEED;
+ if (sc->bge_asicrev == BGE_ASICREV_BCM5700 ||
+ (sc->bge_asicrev == BGE_ASICREV_BCM5705 &&
+ (sc->bge_chipid != BGE_CHIPID_BCM5705_A0 &&
+ sc->bge_chipid != BGE_CHIPID_BCM5705_A1)) ||
+ sc->bge_asicrev == BGE_ASICREV_BCM5906)
+ sc->bge_phy_flags |= BGE_PHY_NO_WIRESPEED;
if (bge_has_eaddr(sc))
sc->bge_flags |= BGE_FLAG_EADDR;
diff --git a/sys/dev/bge/if_bgereg.h b/sys/dev/bge/if_bgereg.h
index ab88270..dffec31 100644
--- a/sys/dev/bge/if_bgereg.h
+++ b/sys/dev/bge/if_bgereg.h
@@ -2783,7 +2783,7 @@ struct bge_softc {
#define BGE_FLAG_RX_ALIGNBUG 0x04000000
#define BGE_FLAG_SHORT_DMA_BUG 0x08000000
uint32_t bge_phy_flags;
-#define BGE_PHY_WIRESPEED 0x00000001
+#define BGE_PHY_NO_WIRESPEED 0x00000001
#define BGE_PHY_ADC_BUG 0x00000002
#define BGE_PHY_5704_A0_BUG 0x00000004
#define BGE_PHY_JITTER_BUG 0x00000008
diff --git a/sys/dev/mii/brgphy.c b/sys/dev/mii/brgphy.c
index ef5fc27..4c07739 100644
--- a/sys/dev/mii/brgphy.c
+++ b/sys/dev/mii/brgphy.c
@@ -927,7 +927,7 @@ brgphy_reset(struct mii_softc *sc)
brgphy_jumbo_settings(sc, ifp->if_mtu);
- if (bge_sc->bge_phy_flags & BGE_PHY_WIRESPEED)
+ if ((bge_sc->bge_phy_flags & BGE_PHY_NO_WIRESPEED) == 0)
brgphy_ethernet_wirespeed(sc);
/* Enable Link LED on Dell boxes */
OpenPOWER on IntegriCloud