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 40CDD43FC9; Tue, 7 May 2024 14:44:14 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E262C433B1; Tue, 7 May 2024 14:43:53 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2077.outbound.protection.outlook.com [40.107.237.77]) by mails.dpdk.org (Postfix) with ESMTP id CEAFE4339A; Tue, 7 May 2024 14:43:52 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CVnBFhSHQfEY6o7AKabgPo3ip5J4R3OOrTJ/yQInogi9kd6GeiSKTCll7uyzwWbXAkn9ZMKmgJGEAKw4fXFMH7SCe+MskNfmSV9Zt3lKlkmmn7y83O98S8y2S4FQWx0UL/7bnUXWZy1SZlCLPZ4O31Tj7nPEiOHPU+anq5FrWYb7T57nZjAGQyyio+N3IwNgKbmS55R3pVeoEXiqRA0Gvnxjwi8FdBWBW/al+EEO6l88k/yVxmijovvbu07djc4X4Ek+J8zvjx3ZsDkUZxl+0Wq4k2iWg0ISEKuuMCwgj4e2nFN8pR2nq8phI2UCwgxh6GbHFzXN1ePpr99Dn7absA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=GQUUjxxfUFLw1XyFoC4UzBQJB8MlxCS5QdD5IYY2ezo=; b=NCab+Zlc6rX6Ess8aBXLvN74gEE8tMIuDihZQZl1aDr37E7//YUc6oBFpH+yy6yIxi4AajDdTgfj4HkejixCiE7y1PstTjPLA+q0489GhkCZSkHNlaAQ10a/vJzhKWpjDXEelBPmSKfNMO2S6IVoCkekVuoA0GTeDjEsJHV6mSs6VQbk6x1dzW0ujIgWKsWy7XZ1A5MzZPIIIYSFqLbPCAeBYWt+96kVlVeesRT8feRTEdrjla39Yn0KzRE7o5q7r9Hq7W6ioM9Q8ocIKxOdWzgRTPZpa2zG0qc96V+uJBZq4wCmZmXZ9nRTqDMXhX84gefE3RZpoRRIs+Mcb9Fh+w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=dpdk.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GQUUjxxfUFLw1XyFoC4UzBQJB8MlxCS5QdD5IYY2ezo=; b=Cow9JOqaUSk7SppplJijNG/rnX/mmR/F7LjYRFzRBWw76q6X8w47zVFoUD9p1PzboGawXQe6BQqP+8waQQ53WDshhpswWG83oZ27E0qBXwu1BehSzxK1n/9/8fd0fTY5WjZBG0qIChVtvLlyVX2XICnG8J+6bs5Dl4tgptanFLk= Received: from PH7P220CA0052.NAMP220.PROD.OUTLOOK.COM (2603:10b6:510:32b::34) by CH3PR12MB9394.namprd12.prod.outlook.com (2603:10b6:610:1cf::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.41; Tue, 7 May 2024 12:43:45 +0000 Received: from SN1PEPF00036F43.namprd05.prod.outlook.com (2603:10b6:510:32b:cafe::f) by PH7P220CA0052.outlook.office365.com (2603:10b6:510:32b::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.43 via Frontend Transport; Tue, 7 May 2024 12:43:44 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by SN1PEPF00036F43.mail.protection.outlook.com (10.167.248.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7544.18 via Frontend Transport; Tue, 7 May 2024 12:43:44 +0000 Received: from cae-Lilac-RMB.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 7 May 2024 07:43:42 -0500 From: Venkat Kumar Ande To: CC: , Venkat Kumar Ande , Subject: [PATCH v2 05/25] net/axgbe: disable interrupts during device removal Date: Tue, 7 May 2024 18:12:45 +0530 Message-ID: <20240507124305.2318-5-venkatkumar.ande@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240507124305.2318-1-venkatkumar.ande@amd.com> References: <20240412125013.10498-1-VenkatKumar.Ande@amd.com> <20240507124305.2318-1-venkatkumar.ande@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF00036F43:EE_|CH3PR12MB9394:EE_ X-MS-Office365-Filtering-Correlation-Id: 0848eaa6-e5c9-4f67-e510-08dc6e935539 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230031|376005|1800799015|36860700004|82310400017; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?eFYqsEa6N0ARtMBxSM2ugPsD62bt2nfJ0y0nt6EpCOYrH9znnB58pQbaaeIJ?= =?us-ascii?Q?V2XGsHl1QpSH5m11IkYUCeRFfT2dLI/NlCOqcjXRrcjfSWiOqJ4jaj+DXgeS?= =?us-ascii?Q?tQjwe9UMT5R2AilXQrta2wz1Woyl4Ms/o+7Fe4LTRJd+XbgUnyRP7MpTqZi+?= =?us-ascii?Q?wToRCA28JEG4ok4g78AdXOPCy18u9QFXHYtnDxCs97Il5PgV3ukw/nCtVtLT?= =?us-ascii?Q?FLI4XEzjsimHjPWKe5Q0Ly6xgWa2liVc/R3J0zCjhex0tGjlgtyItGg7eYWY?= =?us-ascii?Q?ueaa8DM466tS+g8B7DLpT6wE0dz1M95ZOwkXKDaQLtje7ub2Wayi9ZBiPxhy?= =?us-ascii?Q?5iAAQl/LiQoyQ84m6rSfPXLzOxniTVQb+ehlQQSjZJ9+RbetUcgSGdxTRvxp?= =?us-ascii?Q?uaS01mGtdcz9NKmPaKOFbB9pbJj1cmDyp3d3B6D3Dpy2OsWDU+1cp/iotgOM?= =?us-ascii?Q?XclWliYVBnP7nDUujZbPU5b1qQpe9DudRtFHPbI8yMLq2aPyZsEXOyAGy0DD?= =?us-ascii?Q?hdINKn1XaETz7UD+ldm2GPAUyY1wImDzq3B524YTr+V3jRMK1hgl+r1KuX1d?= =?us-ascii?Q?ukMoz5bEhDzv+xA5eEvKFIBtqnKKTHiEl6xxmpNJ3hrf6yjvoMDoALmBHGO0?= =?us-ascii?Q?gbrBou0Q+qP2ygsFyiXxhuLGYOnTUWVc3r8mBAA6xeTHIjYjDKGjHBTeHmq6?= =?us-ascii?Q?AHRhv5/bBNG5Q78lO/R33aEQO4CTfqrkMIxGfQqrugCByiIjSNycLxFluud8?= =?us-ascii?Q?fg9f7v6hp20/eG8NAUnIr/ih7tfPUyfCYKfRqKkqQOBeZJDqUDZ9Rb8D5W+L?= =?us-ascii?Q?tLUXFxsMagzv4iVJjiUmA2me03dOC5OfFFx87Yhe5i1Def+OuVHM0j7xtYaa?= =?us-ascii?Q?CkqBUMOG5IlasBkvwEL3Gi0SC90BFzEmwbN1wu9U9AowdyWiAGu1EC7QatBW?= =?us-ascii?Q?IGoF0/A5hnA/9HIiyGNDonfxJrC0mUCKjGKFR4KySH2r59wrexR71Ov6Mtw4?= =?us-ascii?Q?vj4GgNaGkELYrwZaRXe/cvCSmSMkcE1gP5uMLbL2zzuPc0VFW37AIvnEdJJN?= =?us-ascii?Q?FuV/0o+Q93OphhyP0x4BBUJAu0bImh0Oet3efjcOBuS067cu81ADgSQCzR6F?= =?us-ascii?Q?0lLkH1ER5OTIRccyl66ck1Q/617OVL2uHIzvhMgGAx2z/0CkGndgSj3fcOlz?= =?us-ascii?Q?uo8uDqyDLl5Sx5w1uR2vj35vSTaYvsj+Ap8+r7Er5hqkBlcMOaTUlPRYN4Bk?= =?us-ascii?Q?ey7q748r393EKhislr4JydTIV5hfgsjyt14zeU8f3ka+l4YZuT01A3sgQVEH?= =?us-ascii?Q?pDtUDSx9cYUgesyUqiToxK+bguQMnitVd4GuVgVxlygOEsHb5qSZf55oxqfo?= =?us-ascii?Q?l4Mwo7YVv8p7j1rNmuep0oupL2Q8?= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(376005)(1800799015)(36860700004)(82310400017); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 May 2024 12:43:44.8248 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0848eaa6-e5c9-4f67-e510-08dc6e935539 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SN1PEPF00036F43.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB9394 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 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") Cc: stable@dpdk.org Signed-off-by: Venkat Kumar Ande --- 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 dd681f15a0..e5d8f7db02 100644 --- a/drivers/net/axgbe/axgbe_ethdev.c +++ b/drivers/net/axgbe/axgbe_ethdev.c @@ -2411,12 +2411,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); @@ -2426,6 +2428,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.34.1