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 A11F0454E9 for ; Tue, 25 Jun 2024 02:00:46 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 955F74113C; Tue, 25 Jun 2024 02:00:46 +0200 (CEST) Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by mails.dpdk.org (Postfix) with ESMTP id 4A4DC400EF for ; Tue, 25 Jun 2024 02:00:45 +0200 (CEST) Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-364c9ec17d1so3140535f8f.0 for ; Mon, 24 Jun 2024 17:00:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719273645; x=1719878445; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=sb6yj+HVwepSrfmYBNUEZJfqhTUhDxizjS4mBVQ1Kwc=; b=QOx4/x1QET4Sk893/qSvwBqDhAgFdNqGcrk6kri6wgGK2ph1vqU/DLC/3X/ckaTQEA VRKTLglXl1apOSBWj2JnYHrntPmCdTO/JzhGfZgJ8bKj8kfH4+6aAd82FoYlYLelhNSO 8E/+VCH6SIVtQYlMfCzgi4xifaoKvQl0nlAF5Yq8xKIDnC19BS6HcXfDQjVwixSVQEHd WeSZuL6/Yc1jGIqfKvWzy4OYhgEoJ9DaFMBZfL2hCfZnNvHOpb28Iee+Z8jdAYufnLze +Si+cxZ9TD1XM4oGmu+IINK5M6S8CipKGx6tbNmUdFtUXgi2a/AR9poh0mpFa8yhtG9n 4xnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719273645; x=1719878445; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sb6yj+HVwepSrfmYBNUEZJfqhTUhDxizjS4mBVQ1Kwc=; b=mSAb6OZfZ05f0NagybrCqxWyRGmTgg+k62geEQexBkzOifB9sV3S+AFHqfYdZIn6TQ VJzyksftYGgvSWKpL6+I0EDKOehZr8r2p8f/9DIV+84Q+8umenZXLd3FRw1oMHVlE3ak wfEKw6Ox0EruXyHV/4npLq833a8r4Oe3z0RUSJ/gpz1/W4xaw5yZYfnNPbY7cLOwuwy8 luOVhrq3HHpGlNH4bR7ndj5dMCHmGxO5Ko3yhzCnl2Rpu9pHLJj1107VA514pKRT5yvN AppeR3xk0PEuJ7LCS9ROCB+RTb51zVZwlQbumtf8Q0fWY4XDPyrBLMskKGsEfy6zNdTz G2iw== X-Forwarded-Encrypted: i=1; AJvYcCUH5GZEjojwUzdDRmTYJkevDLYVGhGWChErl3AZ4qEwc515Lyap2EZ0BO5vcoUA3V3n50FhDOj4Pa+vmdwfi+4= X-Gm-Message-State: AOJu0YxSn8fsCBnaSurv21joB2b8zBcipjhZtv2dzsWQcQpxusFgkZH1 6eMClG78RIwkwF6RLvkuRHVEFK9qjeMxH26A8+z0lDF97AcwYAoH+YUwyg== X-Google-Smtp-Source: AGHT+IEgtCBdAQWJ+785kyhN4vg9MQhS5DPDPFhwjKHFuc1JBBSc7PUv9kht91gPZLYCzT33IMmU9Q== X-Received: by 2002:a5d:6681:0:b0:362:7c2e:e9f7 with SMTP id ffacd0b85a97d-366e94cbbe3mr3758429f8f.32.1719273644752; Mon, 24 Jun 2024 17:00:44 -0700 (PDT) Received: from localhost ([137.220.120.171]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-366388c401asm11374320f8f.45.2024.06.24.17.00.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 17:00:44 -0700 (PDT) From: luca.boccassi@gmail.com To: Venkat Kumar Ande Cc: Selwin Sebastian , dpdk stable Subject: patch 'net/axgbe: fix SFP codes check for DAC cables' has been queued to stable release 22.11.6 Date: Tue, 25 Jun 2024 00:58:15 +0100 Message-Id: <20240624235907.885628-29-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240624235907.885628-1-luca.boccassi@gmail.com> References: <20240624235907.885628-1-luca.boccassi@gmail.com> 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 Hi, FYI, your patch has been queued to stable release 22.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/27/24. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/39527c017d64fc66cd911281f65ec93927adb6a2 Thanks. Luca Boccassi --- >From 39527c017d64fc66cd911281f65ec93927adb6a2 Mon Sep 17 00:00:00 2001 From: Venkat Kumar Ande Date: Tue, 4 Jun 2024 17:41:40 +0530 Subject: [PATCH] net/axgbe: fix SFP codes check for DAC cables [ upstream commit 4eefb1b16acaa69bd757057e0c54c58f11577ba3 ] The current axgbe code assumes that offset 6 of EEPROM SFP DAC (passive) cables is NULL. However, some cables (the 5 meter and 7 meter Molex passive cables) have non-zero data at offset 6. Fix the logic by moving the passive cable check above the active checks, so as not to be improperly identified as an active cable. This will fix the issue for any passive cable that advertises 1000Base-CX in offset 6. Without the fix the user will not get link UP for few DAC cables. Fixes: a5c7273771e8 ("net/axgbe: add phy programming APIs") Signed-off-by: Venkat Kumar Ande Acked-by: Selwin Sebastian --- drivers/net/axgbe/axgbe_phy_impl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_phy_impl.c index 040176b8ef..9aadbefaba 100644 --- a/drivers/net/axgbe/axgbe_phy_impl.c +++ b/drivers/net/axgbe/axgbe_phy_impl.c @@ -625,7 +625,10 @@ static void axgbe_phy_sfp_parse_eeprom(struct axgbe_port *pdata) } /* Determine the type of SFP */ - if (sfp_base[AXGBE_SFP_BASE_10GBE_CC] & AXGBE_SFP_BASE_10GBE_CC_SR) + if (phy_data->sfp_cable == AXGBE_SFP_CABLE_PASSIVE && + axgbe_phy_sfp_bit_rate(sfp_eeprom, AXGBE_SFP_SPEED_10000)) + phy_data->sfp_base = AXGBE_SFP_BASE_10000_CR; + else if (sfp_base[AXGBE_SFP_BASE_10GBE_CC] & AXGBE_SFP_BASE_10GBE_CC_SR) phy_data->sfp_base = AXGBE_SFP_BASE_10000_SR; else if (sfp_base[AXGBE_SFP_BASE_10GBE_CC] & AXGBE_SFP_BASE_10GBE_CC_LR) phy_data->sfp_base = AXGBE_SFP_BASE_10000_LR; @@ -642,9 +645,6 @@ static void axgbe_phy_sfp_parse_eeprom(struct axgbe_port *pdata) phy_data->sfp_base = AXGBE_SFP_BASE_1000_CX; else if (sfp_base[AXGBE_SFP_BASE_1GBE_CC] & AXGBE_SFP_BASE_1GBE_CC_T) phy_data->sfp_base = AXGBE_SFP_BASE_1000_T; - else if ((phy_data->sfp_cable == AXGBE_SFP_CABLE_PASSIVE) && - axgbe_phy_sfp_bit_rate(sfp_eeprom, AXGBE_SFP_SPEED_10000)) - phy_data->sfp_base = AXGBE_SFP_BASE_10000_CR; switch (phy_data->sfp_base) { case AXGBE_SFP_BASE_1000_T: -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-06-25 00:22:15.388135617 +0100 +++ 0029-net-axgbe-fix-SFP-codes-check-for-DAC-cables.patch 2024-06-25 00:22:13.121184344 +0100 @@ -1 +1 @@ -From 4eefb1b16acaa69bd757057e0c54c58f11577ba3 Mon Sep 17 00:00:00 2001 +From 39527c017d64fc66cd911281f65ec93927adb6a2 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 4eefb1b16acaa69bd757057e0c54c58f11577ba3 ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org @@ -25 +26 @@ -index bcefbf28f2..10196cae94 100644 +index 040176b8ef..9aadbefaba 100644