summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_bge.c
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2006-03-16 02:40:17 +0000
committerBrad Smith <brad@cvs.openbsd.org>2006-03-16 02:40:17 +0000
commit35201825df87bc3ecfbb0c249514418424346cd8 (patch)
treee4802bfcb35a2eaf7b68f78db209d5f50948fd40 /sys/dev/pci/if_bge.c
parent6f1a0846b2ef1834287b408614441d4816497d49 (diff)
if the link is down with a card using a fibre interface then show a
media status of none.
Diffstat (limited to 'sys/dev/pci/if_bge.c')
-rw-r--r--sys/dev/pci/if_bge.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/pci/if_bge.c b/sys/dev/pci/if_bge.c
index 35120952a7f..7cde80b0e5e 100644
--- a/sys/dev/pci/if_bge.c
+++ b/sys/dev/pci/if_bge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bge.c,v 1.136 2006/03/10 21:39:01 brad Exp $ */
+/* $OpenBSD: if_bge.c,v 1.137 2006/03/16 02:40:16 brad Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
@@ -3048,8 +3048,11 @@ bge_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr)
ifmr->ifm_status = IFM_AVALID;
ifmr->ifm_active = IFM_ETHER;
if (CSR_READ_4(sc, BGE_MAC_STS) &
- BGE_MACSTAT_TBI_PCS_SYNCHED)
+ BGE_MACSTAT_TBI_PCS_SYNCHED) {
ifmr->ifm_status |= IFM_ACTIVE;
+ } else {
+ ifmr->ifm_active |= IFM_NONE;
+ }
ifmr->ifm_active |= IFM_1000_SX;
if (CSR_READ_4(sc, BGE_MAC_MODE) & BGE_MACMODE_HALF_DUPLEX)
ifmr->ifm_active |= IFM_HDX;