summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_ix.c
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2016-11-30 16:15:45 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2016-11-30 16:15:45 +0000
commite90288a46141343bb973e6010de6f80334e55ccc (patch)
tree9bb956de3fe4490612f00edd346ee23f3619755c /sys/dev/pci/if_ix.c
parent8326192493e66e1d2db75a8bf4945d6e4f5207e4 (diff)
Update media types upon SFP module change
Tested by Hrvoje Popovski and myself.
Diffstat (limited to 'sys/dev/pci/if_ix.c')
-rw-r--r--sys/dev/pci/if_ix.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/pci/if_ix.c b/sys/dev/pci/if_ix.c
index fd2f72af404..82cb1b6ec6a 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.144 2016/11/24 17:39:49 mikeb Exp $ */
+/* $OpenBSD: if_ix.c,v 1.145 2016/11/30 16:15:44 mikeb Exp $ */
/******************************************************************************
@@ -3258,6 +3258,10 @@ ixgbe_handle_mod(struct ix_softc *sc)
/* Set the optics type so system reports correctly */
ixgbe_setup_optics(sc);
+ ifmedia_delete_instance(&sc->media, IFM_INST_ANY);
+ ixgbe_add_media_types(sc);
+ ifmedia_set(&sc->media, IFM_ETHER | IFM_AUTO);
+
ixgbe_handle_msf(sc);
}