Module Name: src Committed By: msaitoh Date: Wed Jan 25 13:08:31 UTC 2017
Modified Files: src/sys/dev/pci/ixgbe: ixgbe.c Log Message: Call ixgbe_get_supported_physical_layer() before ixgbe_add_media_types() to set new media types correctly. To generate a diff of this commit: cvs rdiff -u -r1.65 -r1.66 src/sys/dev/pci/ixgbe/ixgbe.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/pci/ixgbe/ixgbe.c diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.65 src/sys/dev/pci/ixgbe/ixgbe.c:1.66 --- src/sys/dev/pci/ixgbe/ixgbe.c:1.65 Wed Jan 25 07:49:23 2017 +++ src/sys/dev/pci/ixgbe/ixgbe.c Wed Jan 25 13:08:31 2017 @@ -59,7 +59,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ /*$FreeBSD: head/sys/dev/ixgbe/if_ix.c 302384 2016-07-07 03:39:18Z sbruno $*/ -/*$NetBSD: ixgbe.c,v 1.65 2017/01/25 07:49:23 msaitoh Exp $*/ +/*$NetBSD: ixgbe.c,v 1.66 2017/01/25 13:08:31 msaitoh Exp $*/ #include "opt_inet.h" #include "opt_inet6.h" @@ -4015,6 +4015,8 @@ out: /* Adjust media types shown in ifconfig */ ifmedia_removeall(&adapter->media); + /* get_supported_phy_layer will call hw->phy.ops.identify_sfp() */ + adapter->phy_layer = ixgbe_get_supported_physical_layer(hw); ixgbe_add_media_types(adapter); ifmedia_set(&adapter->media, IFM_ETHER | IFM_AUTO); @@ -4036,8 +4038,6 @@ ixgbe_handle_msf(void *context) bool negotiate; IXGBE_CORE_LOCK(adapter); - /* get_supported_phy_layer will call hw->phy.ops.identify_sfp() */ - adapter->phy_layer = ixgbe_get_supported_physical_layer(hw); autoneg = hw->phy.autoneg_advertised; if ((!autoneg) && (hw->mac.ops.get_link_capabilities))