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 5176E454E9 for ; Tue, 25 Jun 2024 02:00:28 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4A66941148; Tue, 25 Jun 2024 02:00:28 +0200 (CEST) Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) by mails.dpdk.org (Postfix) with ESMTP id 6E4EC40EE7 for ; Tue, 25 Jun 2024 02:00:27 +0200 (CEST) Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-4218180a122so37417415e9.1 for ; Mon, 24 Jun 2024 17:00:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719273627; x=1719878427; 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=DD+zi7vqlty/sTFLl2WkR+WuPDapWG/QK7YBAxFAVnY=; b=Sn4RUs1nz3B758TvxLvcNcvWkTTekj7BM0AcVo5mMUuBvJPjeejdRSKCFo/O7GqlJs fcPmsqZCsVPFe12NrP2fNd4W62i1W40l7Pi/BiIlcEy+Qz2jlCuv1V/rE5b1Y1xddA5Z tphW4lihl9dU69X7Q/pu79QWwDltJH6VHXVGJpvEenfq9MNtC/BVLCJkq8O9V5q8Zym6 In1Ux/3m/MttfyNQ59lFku1FrRLt+TlIv1RGV0UB9hRWQPqJPD3FgAZr9ho4XaPjTXRw T5OQLi6R5YEhJtjKINCbxmwWnODJlnSaTscA2E+SDIpORX2dfL4AGn1rWqwd09bkLp6/ 3exw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719273627; x=1719878427; 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=DD+zi7vqlty/sTFLl2WkR+WuPDapWG/QK7YBAxFAVnY=; b=GZRKul8OSVGWm/DoDr2LpQDjXgVVm+moWFh6uN6S5idvcyUQoyfOMsIj7Ii2Pg3Z0o +cTMyPUXo03qxy4nF8SPVeQDyEFudNJv9pE/HBUZ0FC1wbHkY+MMWx7tp1eHLLKZz796 OLr/ofIAg2yOmRGKK4AV/3Uz3evWERj7hUft2cUEBvEE3Fv5kAWSMjFUroMnISU1BaDA yXK77J8pjZt+Ez4S12Fr+UNe+bfLf1NS11WU8j+ZbNt0bZRa1CmAMiWRpUgKC5YjuqJ1 v2VGAMWCIpsqjVXxrVQBcmpCQFMNEmEaVerLj8nDOqfQl5lk2ix6O5X60TIHeD6cwJCQ FgpA== X-Forwarded-Encrypted: i=1; AJvYcCUzGpcT5AUXhBKrlD9nj30hFnf61ZioYNDCYPQqDqXmnzm8pHy20nbIzgKP/LIIN8PdimQ9cbTBgF6JHue4HbI= X-Gm-Message-State: AOJu0YyFjlKpZ27pgxIvCHnkNpW/ic/jBRv8gHSxbyd6rm/+hBC+I4KF zSpotoMljWyM7M1LBfsxjJVYz2Hgyp4d4zUTULe3KzBMazPboAE0 X-Google-Smtp-Source: AGHT+IHVy1iyiA3J1iO/x2c+mpDRj85bXfJl8HdurCfGxZZGSCo9tYu3AfgUa7euIJbLTaMA6Hs20Q== X-Received: by 2002:adf:f848:0:b0:35f:2264:ed80 with SMTP id ffacd0b85a97d-366e94d15d1mr4223273f8f.39.1719273626995; Mon, 24 Jun 2024 17:00:26 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:7aef:1aaa:3dff:d546]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36638d9c1aasm11234239f8f.55.2024.06.24.17.00.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 17:00:26 -0700 (PDT) From: luca.boccassi@gmail.com To: Venkat Kumar Ande Cc: Selwin Sebastian , dpdk stable Subject: patch 'net/axgbe: reset link when link never comes back' has been queued to stable release 22.11.6 Date: Tue, 25 Jun 2024 00:58:09 +0100 Message-Id: <20240624235907.885628-23-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/ad99680c1dbef9bb02191465926b3c4df8fdf0f2 Thanks. Luca Boccassi --- >From ad99680c1dbef9bb02191465926b3c4df8fdf0f2 Mon Sep 17 00:00:00 2001 From: Venkat Kumar Ande Date: Tue, 4 Jun 2024 17:41:34 +0530 Subject: [PATCH] net/axgbe: reset link when link never comes back [ upstream commit edf463256dd35803aaa11b0da704a0542ad20071 ] Normally, auto negotiation and reconnect should be automatically done by the hardware. But there seems to be an issue where auto negotiation has to be restarted manually. This happens because of link training and so even though still connected to the partner the link never "comes back". This needs an auto-negotiation restart. Without the fix the user will not see the link up status Fixes: a5c7273771e8 ("net/axgbe: add phy programming APIs") Signed-off-by: Venkat Kumar Ande Acked-by: Selwin Sebastian --- drivers/net/axgbe/axgbe_mdio.c | 2 +- drivers/net/axgbe/axgbe_phy_impl.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/net/axgbe/axgbe_mdio.c b/drivers/net/axgbe/axgbe_mdio.c index 913ceada0d..b03bc471cb 100644 --- a/drivers/net/axgbe/axgbe_mdio.c +++ b/drivers/net/axgbe/axgbe_mdio.c @@ -1051,7 +1051,7 @@ static void axgbe_phy_status(struct axgbe_port *pdata) &an_restart); if (an_restart) { axgbe_phy_config_aneg(pdata); - return; + goto adjust_link; } if (pdata->phy.link) { diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_phy_impl.c index d97fbbfddd..87795c63c9 100644 --- a/drivers/net/axgbe/axgbe_phy_impl.c +++ b/drivers/net/axgbe/axgbe_phy_impl.c @@ -1697,6 +1697,13 @@ static int axgbe_phy_link_status(struct axgbe_port *pdata, int *an_restart) if (reg & MDIO_STAT1_LSTATUS) return 1; + if (pdata->phy.autoneg == AUTONEG_ENABLE && + phy_data->port_mode == AXGBE_PORT_MODE_BACKPLANE) { + if (rte_bit_relaxed_get32(AXGBE_LINK_INIT, &pdata->dev_state)) { + *an_restart = 1; + } + } + /* No link, attempt a receiver reset cycle */ if (phy_data->rrc_count++) { phy_data->rrc_count = 0; -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-06-25 00:22:15.071800192 +0100 +++ 0023-net-axgbe-reset-link-when-link-never-comes-back.patch 2024-06-25 00:22:13.109184100 +0100 @@ -1 +1 @@ -From edf463256dd35803aaa11b0da704a0542ad20071 Mon Sep 17 00:00:00 2001 +From ad99680c1dbef9bb02191465926b3c4df8fdf0f2 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit edf463256dd35803aaa11b0da704a0542ad20071 ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -38 +39 @@ -index 44ff28517c..54fe9faae0 100644 +index d97fbbfddd..87795c63c9 100644