git: 0097d7ec6bc4 - stable/13 - ixgbe: fix PHY ID for X550

From: Kevin Bowling <kbowling_at_FreeBSD.org>
Date: Thu, 26 Sep 2024 03:33:39 UTC
The branch stable/13 has been updated by kbowling:

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

commit 0097d7ec6bc46a441fb13b703c1ea0388d6033c8
Author:     Radoslaw Tyl <radoslawx.tyl@intel.com>
AuthorDate: 2024-09-19 20:42:14 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2024-09-26 03:32:48 +0000

    ixgbe: fix PHY ID for X550
    
    DPDK commit message
    
    net/ixgbe/base: fix PHY ID for X550
    Function ixgbe_get_phy_type_from_id() for X550_PHY_ID2 and
    X550_PHY_ID3 always return ixgbe_phy_unknown instead of ixgbe_phy_aq
    because phy ID's last 4 bits are always masked, and should not be
    taken into account when selecting phy type.
    
    This patch adds default PHY ID for X550 devices with mask on last 4
    bits (0xFFFFFFF0), and fixes the switch statement to use it.
    
    Fixes: 58ddc80 ("ixgbe/base: add new X550 PHY ids")
    Cc: stable@dpdk.org
    
    Signed-off-by: Radoslaw Tyl <radoslawx.tyl@intel.com>
    Reviewed-by: Piotr Skajewski <piotrx.skajewski@intel.com>
    Reviewed-by: Alice Michael <alice.michael@intel.com>
    
    Obtained from:  DPDK (a9f5a3b)
    
    (cherry picked from commit 9b56dfd27c64fcaf2dfbaa1eb3e2bd2b163fa56c)
---
 sys/dev/ixgbe/ixgbe_phy.c  | 3 +--
 sys/dev/ixgbe/ixgbe_type.h | 1 +
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/dev/ixgbe/ixgbe_phy.c b/sys/dev/ixgbe/ixgbe_phy.c
index f4bee6c34f53..00f396283879 100644
--- a/sys/dev/ixgbe/ixgbe_phy.c
+++ b/sys/dev/ixgbe/ixgbe_phy.c
@@ -462,8 +462,7 @@ enum ixgbe_phy_type ixgbe_get_phy_type_from_id(u32 phy_id)
 	case TN1010_PHY_ID:
 		phy_type = ixgbe_phy_tn;
 		break;
-	case X550_PHY_ID2:
-	case X550_PHY_ID3:
+	case X550_PHY_ID:
 	case X540_PHY_ID:
 		phy_type = ixgbe_phy_aq;
 		break;
diff --git a/sys/dev/ixgbe/ixgbe_type.h b/sys/dev/ixgbe/ixgbe_type.h
index deb68fa03312..1b447f42f17a 100644
--- a/sys/dev/ixgbe/ixgbe_type.h
+++ b/sys/dev/ixgbe/ixgbe_type.h
@@ -1696,6 +1696,7 @@ struct ixgbe_dmac_config {
 #define TN1010_PHY_ID	0x00A19410
 #define TNX_FW_REV	0xB
 #define X540_PHY_ID	0x01540200
+#define X550_PHY_ID	0x01540220
 #define X550_PHY_ID2	0x01540223
 #define X550_PHY_ID3	0x01540221
 #define X557_PHY_ID	0x01540240