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 13399A00C4 for ; Fri, 7 Oct 2022 05:28:41 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 417FB42836; Fri, 7 Oct 2022 05:28:39 +0200 (CEST) Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00071.outbound.protection.outlook.com [40.107.0.71]) by mails.dpdk.org (Postfix) with ESMTP id 3D652427F1; Fri, 7 Oct 2022 05:28:37 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Gm8uZx4XNme2xqzn2piyoc5LE9hP1KwiWOZtKVhBSeTX+2567I9h6HYEB1zlgXzET4H3u7h8wzBqzCS+PCzxvP5znzdchqjP8HQxxQaJBjIWbnTDgQWJrUeWCdBwVwkD0cucYJFA/GWS5EopOC6HaykJOV7Nu8/spui+3VdrSvHMW8v4Um8IGpL7Rd6y2utWohYgsrX0AV11q7KVnpQnYh0CKW+Te4GvxHxb4ASF0MES3K9cw9vaTaK3NJjlDtXMwEaGrO1Kf3//VsP4+J0+s2haOZ7MbL+s1IJ4Muyis1/n+vNLd0uBOP0gtvaXUU4yqNFJQ53uEU5+uWwMwlW3OQ== 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=ni8WihqwSVUbeXGRt+A8GVFPYjB9uAIOQuNXcEznxas=; b=Fan+hItNZPKS5AZyR8C5+GbpuikYiQjgVzHNEH0eQ48fytAJDdEM9+UYiqV33kdPfmrHN6wSVDRqTUofEzgCCtqYzJL+PSsKt8Ar5DhFx/K0fv5L6xuKeaMResFPLQUwWjpZtNwyWALS3/ZMKiiQO3Gbk2Z3ihi4nzIF78kpu+1eGH3dZcEWrgBcTZ1EkzpRxFDK1HqDgdNOk/rY/YhiyiYs7AqmkR3WcUaVTmmUFGQ3KzuUM9s4rTOSPbS/RYnUwOZlUNqFDkOaArZPKDL0Qn9vlU0XeYe8B6QEENT2NJjUAdRTntTWjWqq0LsKv9NB0UIniX6qe12vma0IpH0MTw== 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=ni8WihqwSVUbeXGRt+A8GVFPYjB9uAIOQuNXcEznxas=; b=bwBjrdwgqdUqtLexXU1quvUVb6CPAtCi82yBmqViSY2e4fNWqCQZRpLaBzWfTcePsaHVh63SbuVEnsQmJJLybXski+mqJwM4QSsp1L57zo2wnbk7fEjwadwKb5sX0ZLsy7yayUFqihOHwPuXZNjqPwNW0HuhUXa0B9uKCklehAM= 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 AS8PR04MB8641.eurprd04.prod.outlook.com (2603:10a6:20b:428::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.38; Fri, 7 Oct 2022 03:28:36 +0000 Received: from AS8PR04MB8198.eurprd04.prod.outlook.com ([fe80::9ee7:dafa:ba51:c71e]) by AS8PR04MB8198.eurprd04.prod.outlook.com ([fe80::9ee7:dafa:ba51:c71e%7]) with mapi id 15.20.5676.032; Fri, 7 Oct 2022 03:28:36 +0000 From: Gagandeep Singh To: ferruh.yigit@amd.com, dev@dpdk.org Cc: Apeksha Gupta , stable@dpdk.org, Sachin Saxena , Hemant Agrawal Subject: [PATCH v2 02/16] net/enetfec: fix restart issue Date: Fri, 7 Oct 2022 08:57:29 +0530 Message-Id: <20221007032743.2129353-3-g.singh@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221007032743.2129353-1-g.singh@nxp.com> References: <20220928052516.1279442-1-g.singh@nxp.com> <20221007032743.2129353-1-g.singh@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2P153CA0033.APCP153.PROD.OUTLOOK.COM (2603:1096:4:c7::20) To AS8PR04MB8198.eurprd04.prod.outlook.com (2603:10a6:20b:3b0::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8198:EE_|AS8PR04MB8641:EE_ X-MS-Office365-Filtering-Correlation-Id: f0857ae1-0d73-4c32-9bfb-08daa81404bb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: F9C690ASU8MlHyFdiBi7kpzlaSm5v66iu9/EjT1woisQV+cuLNTQVQqCqAH5WhpDFstCc1nHGHNPpjCl6uRlLn17Bg98oBzlibyFnhX4lowOrOXWnKYGbRfQh3mDf0PEAGUGzyA8xDIEiIYr8OxHb2MnSncrfbzrq/uwAsJ1mJZEr3eCC46RZCtkomPer7Jm1NaiKT5YSlaSAIsuNpsfd3HTmeLb7sammBQu1TvZy+qTuUwXP1MA/0eazZXgbjqA2C4JO5xKHMLvfFHgLGTxWpmQxn6vSgwLmZQKYnYI+xq3XsftfneM3CfHSWavSmrBGXnAd3OcBY1g2kr5Ei9Xg2mLqAiJ+RrNQCEPy/fIrk6E1pecLGKww6ajootHCg9UPFuH/E8kOBblUu9CqUvG59Q7hsWPnSBKMe8zbR4Wg0vKys2saEyu1qGd0+U/UKx8PA6sVQh7caF7d3fEOpB3nyzLU1bQN4UFgQuVvvOUP6LNMpAMUDyM8fP6KUg6s3jCsVLHQk+AE9LJP/qAdIrdKF6OOudPpNCjkLG/8LjttPkRux9unqGxX4o9X8zQMzQFRsig9X2WBrn/GHDyWNFGbx5Ddh4mu6UE5NhAO/rykJhdJsbfi9gyD4IZ79XscxbYFicEdAWoCdawoInn5VE2CyoAW96BMXSlhz4X2Q3lENVS7DDKQjpCA5Cw8cAqo7/H7a8j91mJ6Pr5AldDHEp+8DzmioTVOXieDJiyrBSe/Z6XBXn6jtikorF16flM9eLRag0OfZzmSYpI4kx7+HCEdw== 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)(39860400002)(136003)(366004)(396003)(376002)(346002)(451199015)(36756003)(54906003)(6486002)(6512007)(52116002)(26005)(6506007)(86362001)(5660300002)(8936002)(41300700001)(2906002)(38100700002)(316002)(38350700002)(8676002)(4326008)(478600001)(186003)(1076003)(6666004)(66476007)(66556008)(2616005)(66946007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?sTlsyg3RkRmASXI5JpYb8wEXORd1ILF+DsH16E7ehv6ga7Pb5ptdBMaK+UW7?= =?us-ascii?Q?stoO9SDOOUQ2SHg/zqS3gyiV0MLWcL9KjUFuFdBAXkSMBe+5RSm3KW84BMxh?= =?us-ascii?Q?+opKkXCxNKLYjl7QUD4sY8E8PmEq9Q8SSpbTK4olvZz1mWFpBfsDM5zIABk8?= =?us-ascii?Q?IgOfvoNCqduQ6SXVn2/v9KoDGzwxvL1qpqmqrfD35dTuB+8XlvTG0lx0H9Y+?= =?us-ascii?Q?7cjdjJ179uuxYc+H3t8YSuXEN4Qr4bxHTnknxiA+iqKPjb88v47s2kAX73eb?= =?us-ascii?Q?0PRciCz2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?us-ascii?Q?RvurLzBw9EAQVJXb788jnqw7B9jOWmKSW/7CnkqgzO3FX3++gegRRC7zaLst?= =?us-ascii?Q?SyLLRFMjHKZFnJWmrIa1mm09YzYS71NPm4qEVxuhxrijW2/wCYFw9g5QSDqe?= =?us-ascii?Q?4CtQye6CZA26VDaFMDrJE+JYAm9TyzZ5DYRwjD4yQudKGOIw9rkC81UaJVwh?= =?us-ascii?Q?YUqyMn5dMd2FfKoQzVUt8ghOrERyJ3ta6EP+u/CdIcKymYzFn3/fU0905qcQ?= =?us-ascii?Q?tiW2JuEZ7y9TULjTnB7huiu10sYc23ssMe7+RNVsv8XFTzgy7xxp2y0nwqRD?= =?us-ascii?Q?39i/BFe0INLQSlbAZs67yVKxs1xTBG2IBtZWpDD2bLp894zplA+2wx0Icecp?= =?us-ascii?Q?COyORfjg3Z1CxRJvWIJAuJvpSAvs6i9dC1Jew9r8?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f0857ae1-0d73-4c32-9bfb-08daa81404bb X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8198.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2022 03:28:36.2475 (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: uOMemk58acZBj7YYcbRncKZin6LQ30l7moqVZZt+rwzo9oLAlvSSHwW5fQ5gyFJW X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8641 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 Acked-by: Hemant Agrawal --- 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