- Don't announce PAUSE support for half-duplex when MIIF_FORCEPAUSE is
set. - Let mii_phy_auto() also announce PAUSE support for 10baseT-FDX. MFC after: 1 week
This commit is contained in:
parent
87a303dc63
commit
5c39059aaf
@ -373,10 +373,10 @@ jmphy_setmedia(struct mii_softc *sc, struct ifmedia_entry *ife)
|
|||||||
bmcr |= BMCR_LOOP;
|
bmcr |= BMCR_LOOP;
|
||||||
|
|
||||||
anar = jmphy_anar(ife);
|
anar = jmphy_anar(ife);
|
||||||
if (((IFM_SUBTYPE(ife->ifm_media) == IFM_AUTO ||
|
if ((IFM_SUBTYPE(ife->ifm_media) == IFM_AUTO ||
|
||||||
(ife->ifm_media & IFM_FDX) != 0) &&
|
(ife->ifm_media & IFM_FDX) != 0) &&
|
||||||
(ife->ifm_media & IFM_FLOW) != 0) ||
|
((ife->ifm_media & IFM_FLOW) != 0 ||
|
||||||
(sc->mii_flags & MIIF_FORCEPAUSE) != 0)
|
(sc->mii_flags & MIIF_FORCEPAUSE) != 0))
|
||||||
anar |= ANAR_PAUSE_TOWARDS;
|
anar |= ANAR_PAUSE_TOWARDS;
|
||||||
|
|
||||||
if ((sc->mii_flags & MIIF_HAVE_GTCR) != 0) {
|
if ((sc->mii_flags & MIIF_HAVE_GTCR) != 0) {
|
||||||
|
@ -135,8 +135,9 @@ mii_phy_setmedia(struct mii_softc *sc)
|
|||||||
gtcr |= GTCR_ADV_MS;
|
gtcr |= GTCR_ADV_MS;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((ife->ifm_media & IFM_GMASK) == (IFM_FDX | IFM_FLOW) ||
|
if ((ife->ifm_media & IFM_FDX) != 0 &&
|
||||||
(sc->mii_flags & MIIF_FORCEPAUSE) != 0) {
|
((ife->ifm_media & IFM_FLOW) != 0 ||
|
||||||
|
(sc->mii_flags & MIIF_FORCEPAUSE) != 0)) {
|
||||||
if ((sc->mii_flags & MIIF_IS_1000X) != 0)
|
if ((sc->mii_flags & MIIF_IS_1000X) != 0)
|
||||||
anar |= ANAR_X_PAUSE_TOWARDS;
|
anar |= ANAR_X_PAUSE_TOWARDS;
|
||||||
else {
|
else {
|
||||||
@ -184,7 +185,8 @@ mii_phy_auto(struct mii_softc *sc)
|
|||||||
ANAR_CSMA;
|
ANAR_CSMA;
|
||||||
if ((ife->ifm_media & IFM_FLOW) != 0 ||
|
if ((ife->ifm_media & IFM_FLOW) != 0 ||
|
||||||
(sc->mii_flags & MIIF_FORCEPAUSE) != 0) {
|
(sc->mii_flags & MIIF_FORCEPAUSE) != 0) {
|
||||||
if ((sc->mii_capabilities & BMSR_100TXFDX) != 0)
|
if ((sc->mii_capabilities &
|
||||||
|
(BMSR_10TFDX | BMSR_100TXFDX)) != 0)
|
||||||
anar |= ANAR_FC;
|
anar |= ANAR_FC;
|
||||||
/* XXX Only 1000BASE-T has PAUSE_ASYM? */
|
/* XXX Only 1000BASE-T has PAUSE_ASYM? */
|
||||||
if (((sc->mii_flags & MIIF_HAVE_GTCR) != 0) &&
|
if (((sc->mii_flags & MIIF_HAVE_GTCR) != 0) &&
|
||||||
|
Loading…
Reference in New Issue
Block a user