summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2006-12-30 20:59:45 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2006-12-30 20:59:45 +0000
commitd9be4344b23e82ad5f4cba4d5a029a9befc6920c (patch)
tree9cf92af8d713185e72c408dc04a87cd84c4fc665
parentee38447076f804e2eab9abcaeccf7202f7308187 (diff)
Only advertise flow control if MIIF_DOPAUSE is set.
From brad@
-rw-r--r--sys/dev/mii/ipgphy.c13
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);