diff options
author | 2006-12-30 20:59:44 +0000 | |
---|---|---|
committer | 2006-12-30 20:59:44 +0000 | |
commit | 1de346f12a4ecd9c578215ed27c798f9d99d8b6b (patch) | |
tree | 92a77aa0892aa03a1c24ac261b8b55465faa93d8 /sys | |
parent | Pass MIIF_FORCEANEG to mii_attack() until we stop doing unnecessary PHY (diff) | |
download | wireguard-openbsd-1de346f12a4ecd9c578215ed27c798f9d99d8b6b.tar.xz wireguard-openbsd-1de346f12a4ecd9c578215ed27c798f9d99d8b6b.zip |
Only advertise flow control if MIIF_DOPAUSE is set.
From brad@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/mii/ipgphy.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/dev/mii/ipgphy.c b/sys/dev/mii/ipgphy.c index 6b964113523..519ef03dc11 100644 --- a/sys/dev/mii/ipgphy.c +++ b/sys/dev/mii/ipgphy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipgphy.c,v 1.4 2006/12/29 21:40:47 kettenis Exp $ */ +/* $OpenBSD: ipgphy.c,v 1.5 2006/12/30 20:59:44 kettenis Exp $ */ /*- * Copyright (c) 2006, Pyun YongHyeon <yongari@FreeBSD.org> @@ -348,10 +348,13 @@ ipgphy_mii_phy_auto(struct mii_softc *mii) { uint32_t reg; - PHY_WRITE(mii, IPGPHY_MII_ANAR, - IPGPHY_ANAR_10T | IPGPHY_ANAR_10T_FDX | - IPGPHY_ANAR_100TX | IPGPHY_ANAR_100TX_FDX | - IPGPHY_ANAR_PAUSE | IPGPHY_ANAR_APAUSE); + reg = IPGPHY_ANAR_10T | IPGPHY_ANAR_10T_FDX | + IPGPHY_ANAR_100TX | IPGPHY_ANAR_100TX_FDX; + + if (sc->mii_flags & MIIF_DOPAUSE) + reg |= IPGPHY_ANAR_PAUSE | IPGPHY_ANAR_APAUSE; + + PHY_WRITE(mii, IPGPHY_MII_ANAR, reg); reg = IPGPHY_1000CR_1000T | IPGPHY_1000CR_1000T_FDX; reg |= IPGPHY_1000CR_MASTER; PHY_WRITE(mii, IPGPHY_MII_1000CR, reg); |