git: ab92cab02633 - main - ixv: fix x550 VF link speed reported

From: Kevin Bowling <kbowling_at_FreeBSD.org>
Date: Thu, 19 Sep 2024 20:34:34 UTC
The branch main has been updated by kbowling:

URL: https://cgit.FreeBSD.org/src/commit/?id=ab92cab02633580f763a38a329a5b25050bb4fbf

commit ab92cab02633580f763a38a329a5b25050bb4fbf
Author:     Piotr Skajewski <piotrx.skajewski@intel.com>
AuthorDate: 2024-09-19 20:31:45 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2024-09-19 20:32:24 +0000

    ixv: fix x550 VF link speed reported
    
    DPDK commit message
    
    net/ixgbe/base: fix 5G link speed reported on VF
    When 5000 Base-T was set on PF the VF reported 100 Base-T. This patch
    changes ixgbe_check_mac_link_vf function where there was an incorrect
    conditional which checks using PF mac types, now it is correctly
    using VF mac types.
    
    Fixes: 12e2090 ("net/ixgbe/base: include new speeds in VFLINK interpretation")
    Cc: stable@dpdk.org
    
    Signed-off-by: Piotr Skajewski <piotrx.skajewski@intel.com>
    Reviewed-by: Radoslaw Tyl <radoslawx.tyl@intel.com>
    Reviewed-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
    Reviewed-by: Alice Michael <alice.michael@intel.com>
    
    Obtained from:  DPDK (9eb7fdb)
    MFC after:      1 week
---
 sys/dev/ixgbe/ixgbe_vf.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sys/dev/ixgbe/ixgbe_vf.c b/sys/dev/ixgbe/ixgbe_vf.c
index 91df9b7dd1c3..beef259de339 100644
--- a/sys/dev/ixgbe/ixgbe_vf.c
+++ b/sys/dev/ixgbe/ixgbe_vf.c
@@ -642,7 +642,7 @@ s32 ixgbe_check_mac_link_vf(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
 	switch (links_reg & IXGBE_LINKS_SPEED_82599) {
 	case IXGBE_LINKS_SPEED_10G_82599:
 		*speed = IXGBE_LINK_SPEED_10GB_FULL;
-		if (hw->mac.type >= ixgbe_mac_X550) {
+		if (hw->mac.type >= ixgbe_mac_X550_vf) {
 			if (links_reg & IXGBE_LINKS_SPEED_NON_STD)
 				*speed = IXGBE_LINK_SPEED_2_5GB_FULL;
 		}
@@ -652,7 +652,7 @@ s32 ixgbe_check_mac_link_vf(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
 		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_vf) {
 			if (links_reg & IXGBE_LINKS_SPEED_NON_STD)
 				*speed = IXGBE_LINK_SPEED_5GB_FULL;
 		}
@@ -660,7 +660,7 @@ s32 ixgbe_check_mac_link_vf(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
 	case IXGBE_LINKS_SPEED_10_X550EM_A:
 		*speed = IXGBE_LINK_SPEED_UNKNOWN;
 		/* Since Reserved in older MAC's */
-		if (hw->mac.type >= ixgbe_mac_X550)
+		if (hw->mac.type >= ixgbe_mac_X550_vf)
 			*speed = IXGBE_LINK_SPEED_10_FULL;
 		break;
 	default: