summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_em.c
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2008-03-02 01:28:17 +0000
committerBrad Smith <brad@cvs.openbsd.org>2008-03-02 01:28:17 +0000
commitbe9ec249521fd803a22754edf4bbae17ee69953e (patch)
tree2ca9e5ecb048604a47d8aaa347d8f5513d14c1e5 /sys/dev/pci/if_em.c
parentcb15f3fd242f216ed7b341d7dad9039602ac7c9e (diff)
At the moment em_flowstatus() does not deal with fiber interfaces and
will not return any flow control status so just return no status (0) instead of reading copper PHY registers and not returning anything anyway. ok kettenis@
Diffstat (limited to 'sys/dev/pci/if_em.c')
-rw-r--r--sys/dev/pci/if_em.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c
index 09abb4f951d..10502bd2130 100644
--- a/sys/dev/pci/if_em.c
+++ b/sys/dev/pci/if_em.c
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
***************************************************************************/
-/* $OpenBSD: if_em.c,v 1.179 2008/03/02 00:02:11 brad Exp $ */
+/* $OpenBSD: if_em.c,v 1.180 2008/03/02 01:28:16 brad Exp $ */
/* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */
#include <dev/pci/if_em.h>
@@ -932,6 +932,10 @@ em_flowstatus(struct em_softc *sc)
{
u_int16_t ar, lpar;
+ if (sc->hw.media_type == em_media_type_fiber ||
+ sc->hw.media_type == em_media_type_internal_serdes)
+ return (0);
+
em_read_phy_reg(&sc->hw, PHY_AUTONEG_ADV, &ar);
em_read_phy_reg(&sc->hw, PHY_LP_ABILITY, &lpar);