From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <stable-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 086A5454E9
	for <public@inbox.dpdk.org>; Tue, 25 Jun 2024 02:00:42 +0200 (CEST)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 02AE940EDD;
	Tue, 25 Jun 2024 02:00:42 +0200 (CEST)
Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com
 [209.85.128.41]) by mails.dpdk.org (Postfix) with ESMTP id B4C30400EF
 for <stable@dpdk.org>; Tue, 25 Jun 2024 02:00:40 +0200 (CEST)
Received: by mail-wm1-f41.google.com with SMTP id
 5b1f17b1804b1-4249196a361so12214755e9.0
 for <stable@dpdk.org>; Mon, 24 Jun 2024 17:00:40 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1719273640; x=1719878440; 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=5JW3qQDocoIaPopd3Rjg989q1+BoHiJUih8JglePaNs=;
 b=XXlKsxSvM4X5ou7wm3uUnTUJFxqy63RrKoPbfDQpAotYovZrr9S3mbBWyJB5gylsTh
 AOA/tiUBJCVZiWWWU3kiB97Yw8j+X9DPzmIDjyxUFgnNfcubJP8BH7/5MCMHhFY3RkrS
 K3w9/wR+FesS0XkA913ti9NpGF/BCfyb8hCoTqC2RDv/CcK5Dx3zYv3nngq+hWD2SbiT
 5aeCogL2jYJ5HSCYlUkcfvNwObTN/zpHPbAsU/4E5IVUI+sI95XlVRI3Yg/OFDa+3S/U
 4XEdFcGdkbktLRooQoBDWx1cwmiYZu3QwtLlocaaooTUh2ja4CbajO9Z9Y9Z272rcz7i
 nBWg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1719273640; x=1719878440;
 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=5JW3qQDocoIaPopd3Rjg989q1+BoHiJUih8JglePaNs=;
 b=Q2/lmv2OUdPpfiyXhawOygkVkOPfWbv/VlyqzhfzRqmFQQPTKcLXlUfgr876uXFXhn
 EbG0UWzjbpXmAnYDP48h91AIm8+DzcHMB8kyyPpkBN9Z8fdru95ZRm9M8S59DO/9hKlx
 fwYLb8dTmfsEmtn6rTYzYpQoRo8YsBsu2FgameLH8KxjKrlhv5beg39/M9tawTfEPy/c
 S8iO2M7czO3K3NfKo8DT3tNQMt7NFcwLa652XmKRq1TVwCIJQWJf0ZFF8iDcFGSQl9Te
 xlefHtHHd9wA83/G8ruIbzInkO8iZYC1cyeVCAXNMIDrGyze6PyZfNC3iYbqsJoiNlfB
 0TvQ==
X-Forwarded-Encrypted: i=1;
 AJvYcCXVB9JC4vtl3ZKr027GBmFAMk4XgEMYxsGiXWH7bXj9sTXhSPrYKexWDubutiNU/nm5+k5b2wxl9cBfBe3AVlQ=
X-Gm-Message-State: AOJu0YzAqoINQwMbyKdmLVOfTplRo+6MXVxMArme3jo2GKqPCP+woDom
 F2rd0bxTdP2YFCqcHUVXojFFjG/zL9HUSq0wGAXx2nf4s9fPpsCC
X-Google-Smtp-Source: AGHT+IHcN2FvY7+NZXcpds3SvcxShZZYGr7wOKwBfnTaBF9oSx6suO4puo8+9P1km8fzUCj6ClgpWg==
X-Received: by 2002:a05:600c:3204:b0:421:7296:ba3f with SMTP id
 5b1f17b1804b1-4248cc340e9mr38654025e9.22.1719273640308; 
 Mon, 24 Jun 2024 17:00:40 -0700 (PDT)
Received: from localhost ([137.220.120.171]) by smtp.gmail.com with ESMTPSA id
 5b1f17b1804b1-4247d208e4dsm189861235e9.33.2024.06.24.17.00.39
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 24 Jun 2024 17:00:39 -0700 (PDT)
From: luca.boccassi@gmail.com
To: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Cc: Selwin Sebastian <selwin.sebastian@amd.com>, dpdk stable <stable@dpdk.org>
Subject: patch 'net/axgbe: disable interrupts during device removal' has been
 queued to stable release 22.11.6
Date: Tue, 25 Jun 2024 00:58:12 +0100
Message-Id: <20240624235907.885628-26-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 <stable.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/stable>,
 <mailto:stable-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/stable/>
List-Post: <mailto:stable@dpdk.org>
List-Help: <mailto:stable-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/stable>,
 <mailto:stable-request@dpdk.org?subject=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/b07fc265f973fc695348b01163ff3ba23dc5de7d

Thanks.

Luca Boccassi

---
>From b07fc265f973fc695348b01163ff3ba23dc5de7d Mon Sep 17 00:00:00 2001
From: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Date: Tue, 4 Jun 2024 17:41:37 +0530
Subject: [PATCH] net/axgbe: disable interrupts during device removal

[ upstream commit 7b7288b08760204139085174ba00a2863dfdbbec ]

Hardware interrupts are enabled during the init, however, they are not
disabled during close.

Disable all hardware interrupts during close operation to avoid any
issues.

Fixes: 9e890103267e ("net/axgbe: add Rx/Tx setup")

Signed-off-by: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Acked-by: Selwin Sebastian <selwin.sebastian@amd.com>
---
 drivers/net/axgbe/axgbe_ethdev.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
index da48a3ac42..30440e9e1d 100644
--- a/drivers/net/axgbe/axgbe_ethdev.c
+++ b/drivers/net/axgbe/axgbe_ethdev.c
@@ -2361,12 +2361,14 @@ static int
 axgbe_dev_close(struct rte_eth_dev *eth_dev)
 {
 	struct rte_pci_device *pci_dev;
+	struct axgbe_port *pdata;
 
 	PMD_INIT_FUNC_TRACE();
 
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
 		return 0;
 
+	pdata = eth_dev->data->dev_private;
 	pci_dev = RTE_DEV_TO_PCI(eth_dev->device);
 	axgbe_dev_clear_queues(eth_dev);
 
@@ -2376,6 +2378,9 @@ axgbe_dev_close(struct rte_eth_dev *eth_dev)
 				     axgbe_dev_interrupt_handler,
 				     (void *)eth_dev);
 
+	/* Disable all interrupts in the hardware */
+	XP_IOWRITE(pdata, XP_INT_EN, 0x0);
+
 	return 0;
 }
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-06-25 00:22:15.228850660 +0100
+++ 0026-net-axgbe-disable-interrupts-during-device-removal.patch	2024-06-25 00:22:13.113184181 +0100
@@ -1 +1 @@
-From 7b7288b08760204139085174ba00a2863dfdbbec Mon Sep 17 00:00:00 2001
+From b07fc265f973fc695348b01163ff3ba23dc5de7d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7b7288b08760204139085174ba00a2863dfdbbec ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index dd681f15a0..e5d8f7db02 100644
+index da48a3ac42..30440e9e1d 100644
@@ -25 +26 @@
-@@ -2411,12 +2411,14 @@ static int
+@@ -2361,12 +2361,14 @@ static int
@@ -40 +41 @@
-@@ -2426,6 +2428,9 @@ axgbe_dev_close(struct rte_eth_dev *eth_dev)
+@@ -2376,6 +2378,9 @@ axgbe_dev_close(struct rte_eth_dev *eth_dev)