diff options
author | Bill Paul <wpaul@FreeBSD.org> | 2001-07-08 16:24:01 +0000 |
---|---|---|
committer | Bill Paul <wpaul@FreeBSD.org> | 2001-07-08 16:24:01 +0000 |
commit | 2ce0498bd73ef4edd5ab7c1f1065ea788736eff2 (patch) | |
tree | 90b481578f1b2faceff6f732aadf08a32baffd2c /sys/dev/nge | |
parent | ab39353eef48fda9ce6b28f96f004d132a0d94f5 (diff) | |
download | src-2ce0498bd73ef4edd5ab7c1f1065ea788736eff2.tar.gz src-2ce0498bd73ef4edd5ab7c1f1065ea788736eff2.zip |
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 )
Notes
Notes:
svn path=/head/; revision=79424
Diffstat (limited to 'sys/dev/nge')
-rw-r--r-- | sys/dev/nge/if_nge.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/dev/nge/if_nge.c b/sys/dev/nge/if_nge.c index 65dd7187e824..9d4a8769ccd7 100644 --- a/sys/dev/nge/if_nge.c +++ b/sys/dev/nge/if_nge.c @@ -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); /* |