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 C20C0A00C2 for ; Wed, 28 Sep 2022 07:25:43 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AFD8F4284D; Wed, 28 Sep 2022 07:25:42 +0200 (CEST) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60067.outbound.protection.outlook.com [40.107.6.67]) by mails.dpdk.org (Postfix) with ESMTP id 6F8C0427F1; Wed, 28 Sep 2022 07:25:40 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NqBpAin6P7Jab+qU+n2gWlJISXcJONtJCG/sgV/Bv88SnuxVUAn6esKzpPBwoK9nZ40XkdNQshKvF+joa0Ew5FcCHcARbF+jppLUgCv0H1fXRioPWIfSgZyaiIltcoNab+/d30Air1hTTIhChMWLQCI4FTh8u/+553JMOuavgmp5Slo1N0+T2CbfTQt1TkXKBuKwj8fwJvqcxGxX9GBKk7VS2WPQavk/N6eSMevOfkfHhifzZOZYzHtuS57hkLcsuAPqR2m/5VN+cg9SXLeho3eGcKImt9HHjcO3i1NqgGRAg2/tzdJg5IXLuDa6nMExEBfyXCVZuLM62B3KVB57+Q== 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=mCVFKEXdRtfaKaqesNqjtabavVG6BiydZqJMI9RFzWs=; b=N7kqm7izcTR2TQRcIx0Th37f+C9IhehihGGuc9VlkuP4APDiCFD11Ru/DYtcgD1dks6gP5z9Pj7YVn8MREJH3GFM/62fjjM1HxCs1HvFJY1EaeF1s9hsCn2cZSj3tYdW1d1QAxmhKgjK+eANh5shhkXFD9+SqOLhyRDOGFcJk63LmHvYZ0cuaZvtxkm855T2ZNjH3oSmFwPZ2NYku/OYRzgC3l5+ZGzeLNm3Q355WxtGfWR5S8uGK++1EU8sAqXN65y7gTuJUikpesWDwOwEjCF56zd1N1dHCAVwDprKp6PZ2woDROlljoz6jIB5RTpbst6egd04CNrc2DpopYVdpg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mCVFKEXdRtfaKaqesNqjtabavVG6BiydZqJMI9RFzWs=; b=fbfH4QOzXsN6s7kgcmgs0SGBVCfDhupJNTmjBi3AclzIrZ/gm7+7dnK5E3nRso4KaNM8ZdgbGevFZ1llmDDX0OzNnkaDLVHDtJ+1ORoCxf1t1a5jSG3vW0kH5jsq1RO+hnPHssQ1nSaB7kv/XQtL9rOHM3yJVF4z/THBAJAhhxc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS8PR04MB8198.eurprd04.prod.outlook.com (2603:10a6:20b:3b0::14) by PA4PR04MB7504.eurprd04.prod.outlook.com (2603:10a6:102:e6::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.25; Wed, 28 Sep 2022 05:25:39 +0000 Received: from AS8PR04MB8198.eurprd04.prod.outlook.com ([fe80::14d0:4458:d6ec:b8b1]) by AS8PR04MB8198.eurprd04.prod.outlook.com ([fe80::14d0:4458:d6ec:b8b1%7]) with mapi id 15.20.5676.017; Wed, 28 Sep 2022 05:25:39 +0000 From: Gagandeep Singh To: ferruh.yigit@amd.com, dev@dpdk.org Cc: Apeksha Gupta , stable@dpdk.org, Sachin Saxena Subject: [PATCH 02/15] net/enetfec: fix restart issue Date: Wed, 28 Sep 2022 10:55:03 +0530 Message-Id: <20220928052516.1279442-3-g.singh@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220928052516.1279442-1-g.singh@nxp.com> References: <20220928052516.1279442-1-g.singh@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SGBP274CA0015.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b0::27) To AS8PR04MB8198.eurprd04.prod.outlook.com (2603:10a6:20b:3b0::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8198:EE_|PA4PR04MB7504:EE_ X-MS-Office365-Filtering-Correlation-Id: f87407c2-c123-4ee5-ceea-08daa111e13e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4UTyfTpFZCnxKOeap9QcFGeG1MecTlmdVhdBbD6NRtEJZI9bh+yNV63KvIonR4mIAsCG4zdFrX4jvAAKKXfIInVi6UDxouNU4UQdLoWXLqTe5op/wJ8zTBwsUBQNflPnsa10KnN7hQwZT4LFctXF9kXJK+K/CJVTn5Ch3wtRPDyxieqJWgiuSZAKoB4WJytwUov80YrssIPJ5yOvtOt2zCBcfXLBNXVCQDLfQI1BlgwXpDRAcQXC/SClYvxyaudVcywo5ZtWcDQCt1Jd6lsFFTjFegcNobMZuMxYI8j1t5Nd650eJmofCyAm/JHuPqFAM3PPFqxQztjNHoE+bDQnweso0cLjU2ufOGzFJJoywqqThH7FpXGntNOO/4AvXb7AJD3wnOhyDKPsjqZv+oeBXy1SmCVGMCRfzCcjtQGa9De7seopvdCCXCYjlWfGPTcCIluBT5GKa9WYqu41npMD8qVpd3S49k5V76v1k65MCG8RWJXiBmhJeCWh+wdCKp334dmUnqbhy9tP7Y0aP3iJjB+7RWfmm1PvkY6nGoxCuFt4nKDV7c+ySUelCqNjShdUSfZfAERGouYe5YFW+tciihMSt4tkLn2QC0xkXmBZSZY2sgrd8Vogqy0WRxwPeyyBQcyWfMuTbOWlt3e847on6igJCUOB9c8ZpcWh49MC4rpn4cuab059BVYLufT6MxQkEs4IzfNu+PQB+IBWNzDO8PjWlvUTYYvSBKHxD9R5G/9B+PgfoWnx84piBE5dAndyrjwXtGShlgXOmqtHwLTh1A== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8PR04MB8198.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(346002)(366004)(376002)(396003)(136003)(39860400002)(451199015)(1076003)(186003)(2616005)(8676002)(38350700002)(8936002)(6506007)(38100700002)(26005)(86362001)(6512007)(6666004)(2906002)(5660300002)(52116002)(478600001)(66556008)(66476007)(54906003)(66946007)(316002)(36756003)(41300700001)(4326008)(6486002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?GxErkZkdXaKzx+5wBFwebm7fQm+iqPa8VSdQrlY+x4mvzeOzjeVwqMwvA1Gz?= =?us-ascii?Q?N/8nBLT+JRG79/WbuEpZHqE8983CunAWJMfNjGa1G+L4wVNsc54hSHFbAWY+?= =?us-ascii?Q?gjoWo62Pvup7FI8r7hnqejm07/Alz+KIi3t2No1j0/jXILJzD8n3oKSUIz0p?= =?us-ascii?Q?YVn8TjjI+olOlxpIl7aushiqGwbrD/JW5u1xKuE9yh3tvJ2IBZ3JMW47ue/w?= =?us-ascii?Q?JHEAzwav3MvTngqeIOCBNNlKgfAkH10uWxcje9Xfd7ITzr50G4SRaEQUmTnp?= =?us-ascii?Q?1/huuwEM8w/D1NJPiyDAZOvm9bQtUT816NiqdEJt1p02/BXxptQdjqrRC92Q?= =?us-ascii?Q?YmRwlx1Fv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mMGb8kW46?= =?us-ascii?Q?kLsA7Y0RdCxMihIEPMBAvM5p3w/LNAZdz83ZkPC+ShkuAsLpczU9aYNQA1eB?= =?us-ascii?Q?PLuinchfHzzMnTJ/g0SeaBwq6P1b30sO32qjNKYPzxt/vULxa0530AmUTDK8?= =?us-ascii?Q?VkQ19zLBVYI0Rqxx+L9SbeY38KcRsO0pBmPnkHkBvcZ1wE7QQzgrljUJWG9+?= =?us-ascii?Q?p2n+G8BWRiICB5vD8XtfbLruYys1z3BE3th4FjYClNvsBxjFoekoyHtpKuAH?= =?us-ascii?Q?iEA3tqyCiqqWdbqmfnNHzlsEdvtnkZdpFC1HthVXpyXrCCzEiaxtQnMcVqHS?= =?us-ascii?Q?5+5VgVTdSrtiDhOFNnatwS7x65u3bcvm8lmdgyIb?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f87407c2-c123-4ee5-ceea-08daa111e13e X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8198.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Sep 2022 05:25:39.6070 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 1EmxhRxMpJEMn/18Q/qU3ANWeq1xfp1jmy3XI75mCv34QMU8vC70HfWyXWTu46+y X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7504 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 From: Apeksha Gupta Queue reset is missing in restart because of which IO cannot work on device restart. This patch fixes the issue by resetting the queues on device restart. Fixes: b84fdd39638b ("net/enetfec: support UIO") Cc: stable@dpdk.org Signed-off-by: Apeksha Gupta Signed-off-by: Sachin Saxena --- drivers/net/enetfec/enet_ethdev.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/enetfec/enet_ethdev.c b/drivers/net/enetfec/enet_ethdev.c index c938e58204..898aad1c37 100644 --- a/drivers/net/enetfec/enet_ethdev.c +++ b/drivers/net/enetfec/enet_ethdev.c @@ -54,6 +54,7 @@ enetfec_restart(struct rte_eth_dev *dev) uint32_t rcntl = OPT_FRAME_SIZE | 0x04; uint32_t ecntl = ENETFEC_ETHEREN; uint32_t val; + int i; /* Clear any outstanding interrupt. */ writel(0xffffffff, (uint8_t *)fep->hw_baseaddr_v + ENETFEC_EIR); @@ -149,6 +150,9 @@ enetfec_restart(struct rte_eth_dev *dev) /* And last, enable the transmit and receive processing */ rte_write32(rte_cpu_to_le_32(ecntl), (uint8_t *)fep->hw_baseaddr_v + ENETFEC_ECR); + + for (i = 0; i < fep->max_rx_queues; i++) + rte_write32(0, fep->rx_queues[i]->bd.active_reg_desc); rte_delay_us(10); } -- 2.25.1