From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7468A43EAD for ; Wed, 24 Apr 2024 15:22:25 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5E0D843491; Wed, 24 Apr 2024 15:22:22 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) by mails.dpdk.org (Postfix) with ESMTP id 87EA64347F; Wed, 24 Apr 2024 15:22:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1713964940; x=1745500940; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=MiRQVDfu+ENHKZICn9OlVLShw/50Smpfl3hrP7t+rEU=; b=D3tTK3SHPeIpw65S6m+6uBtmwmXAroXYfGivbnqdMgWhQ+EmhXr2jBPK dk1kZjPJ8iEj8WTn9rs51N8yBGSiwcSaklHXzl6EtGQXGwH60LLocPRXi ifmIJLVZajtCCp8onwqJSHs//n59arxEWDUKBYiqIIImo9kLK9gtndgd+ c4j1RxiwmsOirLSWvcCFZzZCWgStt3JW/y9OwIKCQDiBM7sCOVxk0jzmk D04TaIMLAhiZzDj2vayUFq0gHR9vq2yaVo+7h6IBMLak0uh+BaYlrJx5X bz974xk/j338vriU3P2GVDg3RDPKwaPnRx9/uRIl5Aa/xsmE6gB84mAhb Q==; X-CSE-ConnectionGUID: D5ycO6RnQbu2DtcF2n6wxg== X-CSE-MsgGUID: WwM+9BBSSma3Ufqih/fxCQ== X-IronPort-AV: E=McAfee;i="6600,9927,11054"; a="20289241" X-IronPort-AV: E=Sophos;i="6.07,226,1708416000"; d="scan'208";a="20289241" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Apr 2024 06:22:19 -0700 X-CSE-ConnectionGUID: qI1hm4CCSQiOAxWRygMJ4g== X-CSE-MsgGUID: 6J2G9e3XSWKN0KZdbag3zA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,226,1708416000"; d="scan'208";a="24749296" Received: from silpixa00401119.ir.intel.com ([10.55.129.167]) by fmviesa006.fm.intel.com with ESMTP; 24 Apr 2024 06:22:17 -0700 From: Anatoly Burakov To: dev@dpdk.org, Wenzhuo Lu , Helin Zhang Cc: Radoslaw Tyl , vladimir.medvedkin@intel.com, bruce.richardson@intel.com, stable@dpdk.org, Skajewski@dpdk.org, PiotrX , Michael@dpdk.org, Alice Subject: [PATCH v1 03/22] net/ixgbe/base: fix PHY ID for X550 Date: Wed, 24 Apr 2024 14:21:37 +0100 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org From: Radoslaw Tyl 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: 58ddc803e412 ("ixgbe/base: add new X550 PHY ids") Cc: stable@dpdk.org Signed-off-by: Radoslaw Tyl Reviewed-by: Skajewski, PiotrX Reviewed-by: Michael, Alice --- drivers/net/ixgbe/base/ixgbe_phy.c | 3 +-- drivers/net/ixgbe/base/ixgbe_type.h | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ixgbe/base/ixgbe_phy.c b/drivers/net/ixgbe/base/ixgbe_phy.c index 3a8e603472..56267bb00d 100644 --- a/drivers/net/ixgbe/base/ixgbe_phy.c +++ b/drivers/net/ixgbe/base/ixgbe_phy.c @@ -432,8 +432,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/drivers/net/ixgbe/base/ixgbe_type.h b/drivers/net/ixgbe/base/ixgbe_type.h index 35212a561b..f709681df2 100644 --- a/drivers/net/ixgbe/base/ixgbe_type.h +++ b/drivers/net/ixgbe/base/ixgbe_type.h @@ -1664,6 +1664,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 -- 2.43.0