summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2016-11-18 19:49:22 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2016-11-18 19:49:22 +0000
commitc587c1a23cc2cd24a4ed01ee666b261963a48b35 (patch)
treec87bbefa2f2e9e20647a36d4aa350d68775b098c /sys/dev/pci
parentfbe0ea420334e669e743188bccb42a3e43af6f56 (diff)
Recognize active SPF+ DA modules as IFM_10G_SFP_CU
Reported and tested by Hrvoje Popovski, thanks!
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/if_ix.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/dev/pci/if_ix.c b/sys/dev/pci/if_ix.c
index cedc1f6167d..578c0a45b98 100644
--- a/sys/dev/pci/if_ix.c
+++ b/sys/dev/pci/if_ix.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ix.c,v 1.136 2016/11/18 14:16:10 mikeb Exp $ */
+/* $OpenBSD: if_ix.c,v 1.137 2016/11/18 19:49:21 mikeb Exp $ */
/******************************************************************************
@@ -1008,7 +1008,7 @@ ixgbe_intr(void *arg)
*
**********************************************************************/
void
-ixgbe_media_status(struct ifnet * ifp, struct ifmediareq * ifmr)
+ixgbe_media_status(struct ifnet * ifp, struct ifmediareq *ifmr)
{
struct ix_softc *sc = ifp->if_softc;
@@ -1430,7 +1430,8 @@ ixgbe_setup_optics(struct ix_softc *sc)
sc->optics = IFM_1000_T;
else if (layer & IXGBE_PHYSICAL_LAYER_100BASE_TX)
sc->optics = IFM_100_TX;
- else if (layer & IXGBE_PHYSICAL_LAYER_SFP_PLUS_CU)
+ else if (layer & (IXGBE_PHYSICAL_LAYER_SFP_PLUS_CU |
+ IXGBE_PHYSICAL_LAYER_SFP_ACTIVE_DA))
sc->optics = IFM_10G_SFP_CU;
else if (layer & (IXGBE_PHYSICAL_LAYER_10GBASE_LR |
IXGBE_PHYSICAL_LAYER_10GBASE_LRM))
@@ -1444,8 +1445,8 @@ ixgbe_setup_optics(struct ix_softc *sc)
sc->optics = IFM_1000_SX;
else if (layer & IXGBE_PHYSICAL_LAYER_1000BASE_LX)
sc->optics = IFM_1000_LX;
- /* If we get here just set the default */
- sc->optics = IFM_ETHER | IFM_AUTO;
+ else
+ sc->optics = IFM_AUTO;
}
/*********************************************************************