aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/mii/brgphy.c
diff options
context:
space:
mode:
authorMarius Strobl <marius@FreeBSD.org>2011-01-14 19:29:53 +0000
committerMarius Strobl <marius@FreeBSD.org>2011-01-14 19:29:53 +0000
commit87a303dc63455d4c98f8b3baefe0cb55557200b1 (patch)
treedc8d4cfb175320bd42ead1837e44df41ab18484d /sys/dev/mii/brgphy.c
parent34259ba39bbeab8b1648592405ef63fd9da6f098 (diff)
downloadsrc-87a303dc63455d4c98f8b3baefe0cb55557200b1.tar.gz
src-87a303dc63455d4c98f8b3baefe0cb55557200b1.zip
- Even after masking the media with IFM_GMASK the result may have bits
besides the duplex ones set so just comparing it with IFM_FDX may lead to false negatives. - Simplify ciphy_service() to only set the manual configuration bits once after we have figured them all out. This also means we no longer unnecessarily update the hardware along the road. MFC after: 1 week
Notes
Notes: svn path=/head/; revision=217413
Diffstat (limited to 'sys/dev/mii/brgphy.c')
-rw-r--r--sys/dev/mii/brgphy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/mii/brgphy.c b/sys/dev/mii/brgphy.c
index 58adc5325d3c..024274d39df7 100644
--- a/sys/dev/mii/brgphy.c
+++ b/sys/dev/mii/brgphy.c
@@ -453,7 +453,7 @@ brgphy_setmedia(struct mii_softc *sc, int media)
break;
}
- if ((media & IFM_GMASK) == IFM_FDX) {
+ if ((media & IFM_FDX) != 0) {
bmcr |= BRGPHY_BMCR_FDX;
gig = BRGPHY_1000CTL_AFD;
} else {