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 6A1D1454E9 for ; Tue, 25 Jun 2024 02:01:02 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 64CA441141; Tue, 25 Jun 2024 02:01:02 +0200 (CEST) Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) by mails.dpdk.org (Postfix) with ESMTP id EA4C640EDD for ; Tue, 25 Jun 2024 02:01:00 +0200 (CEST) Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-424720e73e0so43623895e9.0 for ; Mon, 24 Jun 2024 17:01:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719273660; x=1719878460; 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=lkgiSOqJwZRSD4W2UCdYu07mm87nDIiJlwCsRS2V7lQ=; b=E5GxqBRSh2Eo5j5H7Heg5fQjHEtPteCKDRuUwcHerMUgeIGqpdAsBPBJoGOORdIy3z q7oqWMYHqQFDn2inTSUiPaUjQckOpEMrn7Hiebkx5Iy6D6ktYKOq3S+UV1BwbpJdzsI0 AAO6qFVffCJt8sHPX0MLtT/UuHJ+1ZI9w1LNQvDtApiazW7TYeGAsemMiGsNP1eC/c3B uwPjM1NmS1oBa+2SuXU9SO4MjJHU8Bg0EEbqy2N4Y9CzL8+87WejXn6t4PKaJ67iInbX vB5PN9TOxYggKslgJcnxpG/I+2i+/9iZ9ElCOSPwbc+AqTmXPacC0bPS1PKWJLkIZdoX aZSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719273660; x=1719878460; 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=lkgiSOqJwZRSD4W2UCdYu07mm87nDIiJlwCsRS2V7lQ=; b=eMMDn7Pi4/G3W0V0eSeTMOTgekOxBjbiO3IS2gvyt1mUxdl3b4X6+3VVcIVc/xIx7n TgGg/Mfx0hPtsCFckk1sbxM9bMMzrG5c3qLdV51DbrVwsLhFf5Um/N2PT/V1LCtx9Xqq dh949+6GTJwfxgY2/t75uT9sFaSY9yHsl/nDhcT6du+3a2YYurRKMbj7/SR0qBVG6SSk g8Ec0jAc1Am+rCJ+qbkz0wHGsgRpEcA2oq8ibBT2C5hMY9Sdh5cw8W2aMNjUpfBLvMli 4dueKb1iNYSdMNR/2SLMH7gfDh/+hokxDayIvOIVkfr1TxbWWaoU1yifq42bU9WciapA /PQg== X-Forwarded-Encrypted: i=1; AJvYcCUPCdpHIVOJW176zsWRpFCb+6Cpv1EKZvo3XBLYt2JQr1NBqUPlk4mMtlyewfAaQV5sZwP+RaoI6dU6EtsGWWY= X-Gm-Message-State: AOJu0Yz3CKCh0Fot1tdzzLGYfaOXOm/YAZQHTcdiwz1273ZwxtT3pVgQ cR74k3u0zZreyUbbeIuBOTcw/DWVvsUXkY2+1KkL7xnhUxuOVHoP X-Google-Smtp-Source: AGHT+IF3feDM9E7XFZmHTjG6EGvkgMeLB6IcKypXlRoKMR/PTY2iR9U8GBCzr979JbeRDGDhNghFlA== X-Received: by 2002:a05:600c:3c93:b0:424:9024:d468 with SMTP id 5b1f17b1804b1-4249024d4e1mr32425755e9.17.1719273660559; Mon, 24 Jun 2024 17:01:00 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:7aef:1aaa:3dff:d546]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4247d21243esm193425885e9.43.2024.06.24.17.00.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 17:01:00 -0700 (PDT) From: luca.boccassi@gmail.com To: Venkat Kumar Ande Cc: Selwin Sebastian , dpdk stable Subject: patch 'net/axgbe: fix linkup in PHY status' has been queued to stable release 22.11.6 Date: Tue, 25 Jun 2024 00:58:20 +0100 Message-Id: <20240624235907.885628-34-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/ac5a8e2ab5732ba8872f34e2fbb199f10d067400 Thanks. Luca Boccassi --- >From ac5a8e2ab5732ba8872f34e2fbb199f10d067400 Mon Sep 17 00:00:00 2001 From: Venkat Kumar Ande Date: Tue, 4 Jun 2024 17:41:45 +0530 Subject: [PATCH] net/axgbe: fix linkup in PHY status [ upstream commit 50362d0e1f386563a026b314bd0a7eedcd188910 ] In the event of a change in axgbe mode, the current auto-negotiation needs to be reset and the AN cycle needs to be re-triggered. However, the current code ignores the return value of axgbe_set_mode(), leading to false information as the link is declared without checking the status register. Fix this by propagating the mode switch status information to axgbe_phy_status(). Fixes: 102b6ec3d5c3 ("net/axgbe: support auto-negotiation for 1Gbps") Signed-off-by: Venkat Kumar Ande Acked-by: Selwin Sebastian --- drivers/net/axgbe/axgbe_mdio.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/net/axgbe/axgbe_mdio.c b/drivers/net/axgbe/axgbe_mdio.c index e1a737cf62..d95a52659e 100644 --- a/drivers/net/axgbe/axgbe_mdio.c +++ b/drivers/net/axgbe/axgbe_mdio.c @@ -200,13 +200,14 @@ static void axgbe_switch_mode(struct axgbe_port *pdata) axgbe_change_mode(pdata, pdata->phy_if.phy_impl.switch_mode(pdata)); } -static void axgbe_set_mode(struct axgbe_port *pdata, +static bool axgbe_set_mode(struct axgbe_port *pdata, enum axgbe_mode mode) { if (mode == axgbe_cur_mode(pdata)) - return; + return false; axgbe_change_mode(pdata, mode); + return true; } static bool axgbe_use_mode(struct axgbe_port *pdata, @@ -1007,7 +1008,7 @@ static enum axgbe_mode axgbe_phy_status_aneg(struct axgbe_port *pdata) return pdata->phy_if.phy_impl.an_outcome(pdata); } -static void axgbe_phy_status_result(struct axgbe_port *pdata) +static bool axgbe_phy_status_result(struct axgbe_port *pdata) { enum axgbe_mode mode; @@ -1041,7 +1042,10 @@ static void axgbe_phy_status_result(struct axgbe_port *pdata) pdata->phy.duplex = DUPLEX_FULL; - axgbe_set_mode(pdata, mode); + if (axgbe_set_mode(pdata, mode)) + return true; + else + return false; } static int autoneg_time_out(unsigned long autoneg_start_time) @@ -1108,7 +1112,10 @@ static void axgbe_phy_status(struct axgbe_port *pdata) return; } } - axgbe_phy_status_result(pdata); + + if (axgbe_phy_status_result(pdata)) + return; + if (rte_bit_relaxed_get32(AXGBE_LINK_INIT, &pdata->dev_state)) rte_bit_relaxed_clear32(AXGBE_LINK_INIT, &pdata->dev_state); -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-06-25 00:22:15.647808194 +0100 +++ 0034-net-axgbe-fix-linkup-in-PHY-status.patch 2024-06-25 00:22:13.125184426 +0100 @@ -1 +1 @@ -From 50362d0e1f386563a026b314bd0a7eedcd188910 Mon Sep 17 00:00:00 2001 +From ac5a8e2ab5732ba8872f34e2fbb199f10d067400 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 50362d0e1f386563a026b314bd0a7eedcd188910 ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org