1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

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:
Pyun YongHyeon 2009-05-25 02:05:00 +00:00
parent c404d8f55a
commit 2c56cee9e4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=192711

View File

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