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 56F7646084; Tue, 14 Jan 2025 11:13:42 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4593A4060F; Tue, 14 Jan 2025 11:13:42 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by mails.dpdk.org (Postfix) with ESMTP id 0CFF3402E4; Tue, 14 Jan 2025 11:13:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1736849621; x=1768385621; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=CrPT8oMu8csOXeGEg8/wXpcRPfQ5feXxTu2tjJho1h8=; b=fOg9KcLgWUDJqAz/+KfqIYCQUCkudguAcwcMmEBWwyz05j6W/DBO6eo5 +JM8H8HEZKT8/P8caRRQSRF0eHX2gCLbebnuvLWWQ4YXn6CQ9oqqzJJ1c XqUQI04MVO7Mhi3xQB9YgaiQSirkoGfRNQ/NU3lvYTN+2blR8n3jj2awz lIMBIiqEouaLrm+RKF7OkDTKBG/2XQAHIuq+oaSeh70k/kjRlXfnOtZ9a LfSb494VFthulb40W7nUWws7M2QE48pMKmn64Y7uCXwcLJAWnYhqZrbYy MGnG8a1AHsYjbfFNofXfFdT52xpOWsPMZeHHW0OeCTjzP4wXkMtOrxrE+ A==; X-CSE-ConnectionGUID: AigfnRGJRf6ewY4oWcgh2A== X-CSE-MsgGUID: b6ulKmi5TFK2RsBuNxZvOw== X-IronPort-AV: E=McAfee;i="6700,10204,11314"; a="36426782" X-IronPort-AV: E=Sophos;i="6.12,314,1728975600"; d="scan'208";a="36426782" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jan 2025 02:13:40 -0800 X-CSE-ConnectionGUID: qh6OYYfsTB+zE3+xjihDBA== X-CSE-MsgGUID: J0ZouPAGTBC5TBXwxvl4pA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="128007270" Received: from unknown (HELO localhost.localdomain) ([10.239.252.210]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jan 2025 02:13:35 -0800 From: Yuan Wang To: dev@dpdk.org Cc: anatoly.burakov@intel.com, vladimir.medvedkin@intel.com, Piotr Kwapulinski , stable@dpdk.org, Yuan Wang Subject: [PATCH 03/10] net/ixgbe/base: disable 2.5/5G speeds from auto-negotiation for E610 Date: Tue, 14 Jan 2025 18:10:13 +0800 Message-ID: <20250114101024.159941-4-yuanx.wang@intel.com> X-Mailer: git-send-email 2.43.5 In-Reply-To: <20250114101024.159941-1-yuanx.wang@intel.com> References: <20250114101024.159941-1-yuanx.wang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Piotr Kwapulinski 2.5 and 5 Gbps link speeds must be excluded from the auto-negotiation set used during driver initialization due to compatibility issues with certain switches. Those issues do not exist in case of E610 2.5G SKU device (0x57b1). Fixes: c6cb313da739 (net/ixgbe/base: add link management for E610) Cc: stable@dpdk.org Signed-off-by: Piotr Kwapulinski Signed-off-by: Yuan Wang --- drivers/net/ixgbe/base/ixgbe_e610.c | 35 +++++++++++++++++++---------- 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/drivers/net/ixgbe/base/ixgbe_e610.c b/drivers/net/ixgbe/base/ixgbe_e610.c index ee8614d3db..a7d642887f 100644 --- a/drivers/net/ixgbe/base/ixgbe_e610.c +++ b/drivers/net/ixgbe/base/ixgbe_e610.c @@ -4256,16 +4256,6 @@ s32 ixgbe_identify_phy_E610(struct ixgbe_hw *hw) pcaps.phy_type_low & IXGBE_PHY_TYPE_LOW_1G_SGMII || pcaps.phy_type_high & IXGBE_PHY_TYPE_HIGH_1G_USXGMII) hw->phy.speeds_supported |= IXGBE_LINK_SPEED_1GB_FULL; - if (pcaps.phy_type_low & IXGBE_PHY_TYPE_LOW_2500BASE_T || - pcaps.phy_type_low & IXGBE_PHY_TYPE_LOW_2500BASE_X || - pcaps.phy_type_low & IXGBE_PHY_TYPE_LOW_2500BASE_KX || - pcaps.phy_type_high & IXGBE_PHY_TYPE_HIGH_2500M_SGMII || - pcaps.phy_type_high & IXGBE_PHY_TYPE_HIGH_2500M_USXGMII) - hw->phy.speeds_supported |= IXGBE_LINK_SPEED_2_5GB_FULL; - if (pcaps.phy_type_low & IXGBE_PHY_TYPE_LOW_5GBASE_T || - pcaps.phy_type_low & IXGBE_PHY_TYPE_LOW_5GBASE_KR || - pcaps.phy_type_high & IXGBE_PHY_TYPE_HIGH_5G_USXGMII) - hw->phy.speeds_supported |= IXGBE_LINK_SPEED_5GB_FULL; if (pcaps.phy_type_low & IXGBE_PHY_TYPE_LOW_10GBASE_T || pcaps.phy_type_low & IXGBE_PHY_TYPE_LOW_10G_SFI_DA || pcaps.phy_type_low & IXGBE_PHY_TYPE_LOW_10GBASE_SR || @@ -4276,10 +4266,31 @@ s32 ixgbe_identify_phy_E610(struct ixgbe_hw *hw) pcaps.phy_type_high & IXGBE_PHY_TYPE_HIGH_10G_USXGMII) hw->phy.speeds_supported |= IXGBE_LINK_SPEED_10GB_FULL; - /* Initialize autoneg speeds */ - if (!hw->phy.autoneg_advertised) + /* 2.5 and 5 Gbps link speeds must be excluded from the + * auto-negotiation set used during driver initialization due to + * compatibility issues with certain switches. Those issues do not + * exist in case of E610 2.5G SKU device (0x57b1). + */ + if (!hw->phy.autoneg_advertised && + hw->device_id != IXGBE_DEV_ID_E610_2_5G_T) hw->phy.autoneg_advertised = hw->phy.speeds_supported; + if (pcaps.phy_type_low & IXGBE_PHY_TYPE_LOW_2500BASE_T || + pcaps.phy_type_low & IXGBE_PHY_TYPE_LOW_2500BASE_X || + pcaps.phy_type_low & IXGBE_PHY_TYPE_LOW_2500BASE_KX || + pcaps.phy_type_high & IXGBE_PHY_TYPE_HIGH_2500M_SGMII || + pcaps.phy_type_high & IXGBE_PHY_TYPE_HIGH_2500M_USXGMII) + hw->phy.speeds_supported |= IXGBE_LINK_SPEED_2_5GB_FULL; + + if (!hw->phy.autoneg_advertised && + hw->device_id == IXGBE_DEV_ID_E610_2_5G_T) + hw->phy.autoneg_advertised = hw->phy.speeds_supported; + + if (pcaps.phy_type_low & IXGBE_PHY_TYPE_LOW_5GBASE_T || + pcaps.phy_type_low & IXGBE_PHY_TYPE_LOW_5GBASE_KR || + pcaps.phy_type_high & IXGBE_PHY_TYPE_HIGH_5G_USXGMII) + hw->phy.speeds_supported |= IXGBE_LINK_SPEED_5GB_FULL; + /* Set PHY ID */ memcpy(&hw->phy.id, pcaps.phy_id_oui, sizeof(u32)); -- 2.43.5