Module Name: src Committed By: msaitoh Date: Fri Oct 13 08:17:44 UTC 2017
Modified Files: src/sys/dev/pci/ixgbe: ixgbe_common.c ixgbe_vf.c ixv.c Log Message: Show 2.5GBASE-T and 5GBASE-T correctly on ixv(4). Tested on a virtual function on X550 T1. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/dev/pci/ixgbe/ixgbe_common.c cvs rdiff -u -r1.13 -r1.14 src/sys/dev/pci/ixgbe/ixgbe_vf.c cvs rdiff -u -r1.70 -r1.71 src/sys/dev/pci/ixgbe/ixv.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_common.c diff -u src/sys/dev/pci/ixgbe/ixgbe_common.c:1.14 src/sys/dev/pci/ixgbe/ixgbe_common.c:1.15 --- src/sys/dev/pci/ixgbe/ixgbe_common.c:1.14 Wed Aug 30 08:49:18 2017 +++ src/sys/dev/pci/ixgbe/ixgbe_common.c Fri Oct 13 08:17:44 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ixgbe_common.c,v 1.14 2017/08/30 08:49:18 msaitoh Exp $ */ +/* $NetBSD: ixgbe_common.c,v 1.15 2017/10/13 08:17:44 msaitoh Exp $ */ /****************************************************************************** @@ -4248,7 +4248,7 @@ s32 ixgbe_check_mac_link_generic(struct break; case IXGBE_LINKS_SPEED_100_82599: *speed = IXGBE_LINK_SPEED_100_FULL; - if (hw->mac.type == ixgbe_mac_X550) { + if (hw->mac.type >= ixgbe_mac_X550) { if (links_reg & IXGBE_LINKS_SPEED_NON_STD) *speed = IXGBE_LINK_SPEED_5GB_FULL; } Index: src/sys/dev/pci/ixgbe/ixgbe_vf.c diff -u src/sys/dev/pci/ixgbe/ixgbe_vf.c:1.13 src/sys/dev/pci/ixgbe/ixgbe_vf.c:1.14 --- src/sys/dev/pci/ixgbe/ixgbe_vf.c:1.13 Wed Aug 30 08:49:18 2017 +++ src/sys/dev/pci/ixgbe/ixgbe_vf.c Fri Oct 13 08:17:44 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ixgbe_vf.c,v 1.13 2017/08/30 08:49:18 msaitoh Exp $ */ +/* $NetBSD: ixgbe_vf.c,v 1.14 2017/10/13 08:17:44 msaitoh Exp $ */ /****************************************************************************** @@ -630,7 +630,7 @@ s32 ixgbe_check_mac_link_vf(struct ixgbe break; case IXGBE_LINKS_SPEED_100_82599: *speed = IXGBE_LINK_SPEED_100_FULL; - if (hw->mac.type == ixgbe_mac_X550) { + if (hw->mac.type >= ixgbe_mac_X550) { if (links_reg & IXGBE_LINKS_SPEED_NON_STD) *speed = IXGBE_LINK_SPEED_5GB_FULL; } Index: src/sys/dev/pci/ixgbe/ixv.c diff -u src/sys/dev/pci/ixgbe/ixv.c:1.70 src/sys/dev/pci/ixgbe/ixv.c:1.71 --- src/sys/dev/pci/ixgbe/ixv.c:1.70 Fri Oct 13 04:52:40 2017 +++ src/sys/dev/pci/ixgbe/ixv.c Fri Oct 13 08:17:44 2017 @@ -1,4 +1,4 @@ -/*$NetBSD: ixv.c,v 1.70 2017/10/13 04:52:40 msaitoh Exp $*/ +/*$NetBSD: ixv.c,v 1.71 2017/10/13 08:17:44 msaitoh Exp $*/ /****************************************************************************** @@ -955,6 +955,12 @@ ixv_media_status(struct ifnet *ifp, stru case IXGBE_LINK_SPEED_10GB_FULL: ifmr->ifm_active |= IFM_10G_T | IFM_FDX; break; + case IXGBE_LINK_SPEED_5GB_FULL: + ifmr->ifm_active |= IFM_5000_T | IFM_FDX; + break; + case IXGBE_LINK_SPEED_2_5GB_FULL: + ifmr->ifm_active |= IFM_2500_T | IFM_FDX; + break; case IXGBE_LINK_SPEED_1GB_FULL: ifmr->ifm_active |= IFM_1000_T | IFM_FDX; break;