mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Save extended address register prior to switching to 1000BASE-X
only mode and restore original value of extended address register instead of overwriting it with page 1. There are still instance information passing issue(e.g configured media type: fiber or copper) from driver to PHY layer but this change make the selected PHY work with 88E1112 PHY. Reported by: Krzysztof Jedruczyk < beaker <at> hot dot pl > Tested by: Krzysztof Jedruczyk < beaker <at> hot dot pl >
This commit is contained in:
parent
fdf7d60d6a
commit
10bace3e92
1 changed files with 3 additions and 2 deletions
|
|
@ -210,7 +210,7 @@ static void
|
|||
e1000phy_reset(struct mii_softc *sc)
|
||||
{
|
||||
struct e1000phy_softc *esc;
|
||||
uint16_t reg;
|
||||
uint16_t reg, page;
|
||||
|
||||
esc = (struct e1000phy_softc *)sc;
|
||||
reg = PHY_READ(sc, E1000_SCR);
|
||||
|
|
@ -219,12 +219,13 @@ e1000phy_reset(struct mii_softc *sc)
|
|||
PHY_WRITE(sc, E1000_SCR, reg);
|
||||
if (esc->mii_model == MII_MODEL_MARVELL_E1112) {
|
||||
/* Select 1000BASE-X only mode. */
|
||||
page = PHY_READ(sc, E1000_EADR);
|
||||
PHY_WRITE(sc, E1000_EADR, 2);
|
||||
reg = PHY_READ(sc, E1000_SCR);
|
||||
reg &= ~E1000_SCR_MODE_MASK;
|
||||
reg |= E1000_SCR_MODE_1000BX;
|
||||
PHY_WRITE(sc, E1000_SCR, reg);
|
||||
PHY_WRITE(sc, E1000_EADR, 1);
|
||||
PHY_WRITE(sc, E1000_EADR, page);
|
||||
}
|
||||
} else {
|
||||
switch (esc->mii_model) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue