From patchwork Mon Dec 4 16:35:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ioana Ciornei X-Patchwork-Id: 13478768 X-Patchwork-Delegate: kuba@kernel.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="Q785ubS3" Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2087.outbound.protection.outlook.com [40.107.7.87]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58081CD for ; Mon, 4 Dec 2023 08:36:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ckk3KLd3yYSZLQ8Y8XLoagI/dysYopJppJmXaHIIj/me5kXo/Q0b2tAurGTyslmJC/eNnZZQAnOZv0OWUdiV7VSit6MFYDViBxg+JVXWgqKU3xNnDvVU2/O25RA64bzwLM/BYkHxyntF+ISwrjBNm7CH3EHPKDVqAZre4LldqcAZOy6lYdSIy7H0EmqANR4E0MNzvlQi9seta8M6Zaw9RaKCT38sRJ5bLr9jk1UJ2Yc4YtZ38ZwNQCwsnCRppmrz6yT4UuuYMwaGXC+AaAyqLB7CO66uH4/kf2p6/ddvdhRAWfw5zo8i2rLcCc2CcWE6xy5RFgWjuic4LRJ62PiFrQ== 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=MIZ4cHOTZxFG39i+ojGcFcTf1WaKuU0eGJDOEcMb+FI=; b=YRiAykk+iRAIEDE7nlq1VYdZOtHzYO0BKHPyGgkjX2zDb2jphNkLb/s7Pat6zjA4Q0iHjaTivtpoKO74q4ynxI8Fv2iD1cnOvsxW9rcPy2Xj0SoLmlJ77sOoLJhzuixi6a2zvL88u9nrQMs1D0+uLlYae9x2wNbJZHpZYEdEns/ccR+UNCcUM1QA9qAjsq5rg3GwOs8PHGi0mhsaAts8VieD+xvGcfsBe2DIkZXza+cefHNpuonMI8ZP2Myp8klZmR+bsG0tzB9pmmgIE6pxqD2JdKQMmy9Oct0WXd8FDAxXIfZXt1A55TnQhci5Jytb0rLmfq+Lnjejk678loBU9g== 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=MIZ4cHOTZxFG39i+ojGcFcTf1WaKuU0eGJDOEcMb+FI=; b=Q785ubS3Kk0XNfBzgQq6Lp6kqJ5f5MByHK4MeXYYhUb1MYXb/6nELzDRJnrcI2tnD+b3ZqaGJ36tGwIpj4/H4/9ER6o+JP3skk7vVMysO1gtWeu5HjKlNjKxXpBgzdt9YKoZDyA1+4pXVajUANE0wYlFKI/cpjuF78CNkqXAzDg= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from GV1PR04MB9070.eurprd04.prod.outlook.com (2603:10a6:150:21::14) by AM9PR04MB8356.eurprd04.prod.outlook.com (2603:10a6:20b:3b4::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.22; Mon, 4 Dec 2023 16:36:04 +0000 Received: from GV1PR04MB9070.eurprd04.prod.outlook.com ([fe80::1290:90d4:98c1:3d35]) by GV1PR04MB9070.eurprd04.prod.outlook.com ([fe80::1290:90d4:98c1:3d35%7]) with mapi id 15.20.7068.022; Mon, 4 Dec 2023 16:36:04 +0000 From: Ioana Ciornei To: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org Cc: Ioana Ciornei Subject: [PATCH 5/8] dpaa2-switch: do not clear any interrupts automatically Date: Mon, 4 Dec 2023 18:35:25 +0200 Message-Id: <20231204163528.1797565-6-ioana.ciornei@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231204163528.1797565-1-ioana.ciornei@nxp.com> References: <20231204163528.1797565-1-ioana.ciornei@nxp.com> X-ClientProxiedBy: FR4P281CA0143.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b8::14) To GV1PR04MB9070.eurprd04.prod.outlook.com (2603:10a6:150:21::14) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1PR04MB9070:EE_|AM9PR04MB8356:EE_ X-MS-Office365-Filtering-Correlation-Id: 461de506-e405-438d-ce2a-08dbf4e71bc8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2Kh0JT7anvxKnlFzfs1ug4J30oMZTMz5c33idSpgJ+YMojE8WqWjh7sovshJsPeD3cKv5FwFNElvci1z1JSvPmEqSwi1oms5Byr7oXB031ojtwd+bVLg/eW8QVQqa7Qp77NlnbNZ4+BmF9iS4PBloTMqJAYE/CUp6hw52DYiuoCIp+ZDSNduuC9Y4JPxy3RRSYpYBjRKQX+9Y48gvM2MWXcmimWNz94Iptj2Y1PZS90S3QWkKaq7AJSVlqB6l5kpF/WFFlqW9pgBNIMgBdscgwGEzex4MP3I5p3fEqKUr0UQErf63MoK+5GJ6ZJg54ypQajZbeER3a62M0u5k7RFWTojzIQf/70WLw4HEB1yQkxngZ9EnNedd2utuMEfK/PkD7sXmjCEM0eePibFRQ/2scWMlGyH1KMsOIyUy7D9v5bz7M9kX+gdnjWOwMuStDlAFV43r/GoSjmR4iQHbfbL7ZB2uMTXZ2OUftGvtsLtgpvDfRwMfwfkwzRIfka9+r/OuoYEwG9BpY1cqVQ3bff0OIMLbaQi0BzOW0rUaHG6+UKKNp1+xBhX3VWYhCnDrXj9 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:GV1PR04MB9070.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376002)(346002)(39860400002)(136003)(366004)(396003)(230922051799003)(64100799003)(186009)(451199024)(1800799012)(66556008)(66476007)(44832011)(316002)(66946007)(5660300002)(4326008)(8936002)(8676002)(6486002)(38100700002)(83380400001)(86362001)(478600001)(2906002)(6666004)(26005)(2616005)(6506007)(6512007)(36756003)(1076003)(41300700001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 1Zn11VgpkxPg6233qpJPmBWgU10skp0b06zbHGGb9hP3baGZgpAtfDBF0K71y8zfq9IU9X1hO1aiI0C7u1izRFsunIjypY6XAfcgbwspwGOMGkt02J9oxU1cR8O8ROH1NevKJVQm3VJS5tOEIxhyAYs4Zk/wbYVHT69EO4RznrxGv0DNnyqiZ6eSTd1BlCAN3ejZAtU0QgAJ7dF50modt9xs3TLZv6YeCMhimg0Bxw0bX8c9kXV4bn+SsJJProTlvr4fFslbZTG3xWrl6xSvJdCMkRYF6Hr+UF9xJrGeuJ5dhgC5UL49wjwRdXPe3PjkeXXfViE02Ml3zG1JiqzY5wg5Z9Sy7vAGZQpNUonI6P4dHRxdQDy/hElkwuk9s4spPIVdhYLlLzSKpcUC5bM0d6vx5ENZs6S0EfE6usd+lFt8KH7lfBHF1cvuxmaBnBtJo3Il8bdDgfHQgZ2KzowT1G2kUQUBc+gaaFMmNfpZ/VtL2wCYxLNs8bKrIa/EplezSWcjQCirt61No5uE/O0yywcHOjczXnm8YwDxN7EUjEdm5c8kNEksNMAiqtcqFmnu9pU6xR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08dbf4e71bc8 X-MS-Exchange-CrossTenant-AuthSource: GV1PR04MB9070.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Dec 2023 16:36:04.4860 (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: WkiYIxZBoWqxuQTsDmvZMy4ro8wlg9Nx4dm+LK6zsqT7f40Hj6wkXZLUEf4FxF8tz1ANdjtYrPZetXRRFA6XRg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8356 X-Patchwork-Delegate: kuba@kernel.org The dpsw_get_irq_status() can clear interrupts automatically based on the value stored in the 'status' variable passed to it. We don't want that to happen because we could get into a situation when we are clearing more interrupts that we actually handled. Just resort to manually clearing interrupts after we received them using the dpsw_clear_irq_status(). Signed-off-by: Ioana Ciornei --- drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c index e91ade7c7c93..d9906573f71f 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c @@ -1509,7 +1509,7 @@ static irqreturn_t dpaa2_switch_irq0_handler_thread(int irq_num, void *arg) struct device *dev = (struct device *)arg; struct ethsw_core *ethsw = dev_get_drvdata(dev); struct ethsw_port_priv *port_priv; - u32 status = ~0; + u32 status = 0; int err, if_id; bool had_mac; @@ -1539,12 +1539,12 @@ static irqreturn_t dpaa2_switch_irq0_handler_thread(int irq_num, void *arg) dpaa2_switch_port_connect_mac(port_priv); } -out: err = dpsw_clear_irq_status(ethsw->mc_io, 0, ethsw->dpsw_handle, DPSW_IRQ_INDEX_IF, status); if (err) dev_err(dev, "Can't clear irq status (err %d)\n", err); +out: return IRQ_HANDLED; }