mirror of
https://github.com/opnsense/src.git
synced 2026-04-27 09:06:49 -04:00
Do not set the MODE_1000 bit unless we actually have a gigabit link.
Previously, I had the MODE_1000 bit in the global config register set unconditionally, which was wrong: we have to turn it off if we have a 10/100 link. This is now handled in the nge_miibus_statchg() routine. Discovered by: Nathan Binkert <binkertn@eecs.umich.edu> (Note: this commit is being done from JFK airport. :P )
This commit is contained in:
parent
ab39353eef
commit
2ce0498bd7
1 changed files with 9 additions and 1 deletions
|
|
@ -636,6 +636,14 @@ static void nge_miibus_statchg(dev)
|
|||
NGE_CLRBIT(sc, NGE_RX_CFG, NGE_RXCFG_RX_FDX);
|
||||
}
|
||||
|
||||
/* If we have a 1000Mbps link, set the mode_1000 bit. */
|
||||
if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_TX ||
|
||||
IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_SX) {
|
||||
NGE_SETBIT(sc, NGE_CFG, NGE_CFG_MODE_1000);
|
||||
} else {
|
||||
NGE_CLRBIT(sc, NGE_CFG, NGE_CFG_MODE_1000);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1774,7 +1782,7 @@ static void nge_init(xsc)
|
|||
* extsts field in the DMA descriptors (needed for
|
||||
* TCP/IP checksum offload on transmit).
|
||||
*/
|
||||
NGE_SETBIT(sc, NGE_CFG, NGE_CFG_PHYINTR_SPD|NGE_CFG_MODE_1000|
|
||||
NGE_SETBIT(sc, NGE_CFG, NGE_CFG_PHYINTR_SPD|
|
||||
NGE_CFG_PHYINTR_LNK|NGE_CFG_PHYINTR_DUP|NGE_CFG_EXTSTS_ENB);
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue