Do not ignore NEXT Page capability of auto-negotiation
advertisement register. Some PHYs such as 88E3016 requires NEXT Page capability to establish valid link. Also set protocol selector field which is read only but it makes the intention clearer.
This commit is contained in:
parent
c404d8f55a
commit
2c56cee9e4
@ -490,13 +490,16 @@ static int
|
||||
e1000phy_mii_phy_auto(struct e1000phy_softc *esc)
|
||||
{
|
||||
struct mii_softc *sc;
|
||||
uint16_t reg;
|
||||
|
||||
sc = &esc->mii_sc;
|
||||
if ((sc->mii_flags & MIIF_HAVEFIBER) == 0)
|
||||
PHY_WRITE(sc, E1000_AR, E1000_AR_10T | E1000_AR_10T_FD |
|
||||
if ((sc->mii_flags & MIIF_HAVEFIBER) == 0) {
|
||||
reg = PHY_READ(sc, E1000_AR);
|
||||
reg |= E1000_AR_10T | E1000_AR_10T_FD |
|
||||
E1000_AR_100TX | E1000_AR_100TX_FD |
|
||||
E1000_AR_PAUSE | E1000_AR_ASM_DIR);
|
||||
else
|
||||
E1000_AR_PAUSE | E1000_AR_ASM_DIR;
|
||||
PHY_WRITE(sc, E1000_AR, reg | E1000_AR_SELECTOR_FIELD);
|
||||
} else
|
||||
PHY_WRITE(sc, E1000_AR, E1000_FA_1000X_FD | E1000_FA_1000X |
|
||||
E1000_FA_SYM_PAUSE | E1000_FA_ASYM_PAUSE);
|
||||
if ((sc->mii_extcapabilities & (EXTSR_1000TFDX | EXTSR_1000THDX)) != 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user