From nobody Sat Nov 30 05:44:30 2024 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6E3E142056; Wed, 11 Sep 2024 09:35:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.187 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726047349; cv=none; b=pQul+OORVYkAXOz0sGdftY4iBhqmq+nJsHx/DypRyTsZLgKrQ5r0Y4Un9qOD7+EGj/QQI9rIdZ3Pl0aT/LoHke3QZmFN86WX0rHvzGr35M57yI+yvmlP1zZHNao/HySo3ck1O1NYjOhbwdAYdwYXzl6ZscKvfcavxZNYjB0NqO8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726047349; c=relaxed/simple; bh=xKJrqC3Vz9IIrQzfnp5kBqp9keLOvzaOnIcs6xc/uBc=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=NRXaOWFlFzcXu3slCJVBiKJh2t10UJ8ZCpL5UiUWCNXK/Ts0n7FrKu2e2bghS7BRsKyjwd6YydZQldItGxkPviptHTb6ChjZane/EpT2K6ZwiIc3CCPGtrdvbe2y2LCdIJnj6OwmqNlKzRS4OHpTeoerMZ3cXr1iUXRwf0dTCxo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.187 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.162.254]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4X3b5H5XxwzyRqV; Wed, 11 Sep 2024 17:34:59 +0800 (CST) Received: from kwepemh500013.china.huawei.com (unknown [7.202.181.146]) by mail.maildlp.com (Postfix) with ESMTPS id 6EC3818010F; Wed, 11 Sep 2024 17:35:45 +0800 (CST) Received: from huawei.com (10.90.53.73) by kwepemh500013.china.huawei.com (7.202.181.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Wed, 11 Sep 2024 17:35:44 +0800 From: Jinjie Ruan To: , , , , , , , , , , , , , , , , , CC: Subject: [PATCH net RESEND 1/3] net: apple: bmac: Use IRQF_NO_AUTOEN flag in request_irq() Date: Wed, 11 Sep 2024 17:44:43 +0800 Message-ID: <20240911094445.1922476-2-ruanjinjie@huawei.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240911094445.1922476-1-ruanjinjie@huawei.com> References: <20240911094445.1922476-1-ruanjinjie@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemh500013.china.huawei.com (7.202.181.146) Content-Type: text/plain; charset="utf-8" disable_irq() after request_irq() still has a time gap in which interrupts can come. request_irq() with IRQF_NO_AUTOEN flag will disable IRQ auto-enable when request IRQ. Signed-off-by: Jinjie Ruan --- v1 -> RESEND - Put wireless into another patch set. --- drivers/net/ethernet/apple/bmac.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/apple/bmac.c b/drivers/net/ethernet/apple= /bmac.c index 292b1f9cd9e7..785f4b4ff758 100644 --- a/drivers/net/ethernet/apple/bmac.c +++ b/drivers/net/ethernet/apple/bmac.c @@ -1317,7 +1317,7 @@ static int bmac_probe(struct macio_dev *mdev, const s= truct of_device_id *match) =20 timer_setup(&bp->tx_timeout, bmac_tx_timeout, 0); =20 - ret =3D request_irq(dev->irq, bmac_misc_intr, 0, "BMAC-misc", dev); + ret =3D request_irq(dev->irq, bmac_misc_intr, IRQF_NO_AUTOEN, "BMAC-misc"= , dev); if (ret) { printk(KERN_ERR "BMAC: can't get irq %d\n", dev->irq); goto err_out_iounmap_rx; @@ -1336,7 +1336,6 @@ static int bmac_probe(struct macio_dev *mdev, const s= truct of_device_id *match) /* Mask chip interrupts and disable chip, will be * re-enabled on open() */ - disable_irq(dev->irq); pmac_call_feature(PMAC_FTR_BMAC_ENABLE, macio_get_of_node(bp->mdev), 0, 0= ); =20 if (register_netdev(dev) !=3D 0) { --=20 2.34.1 From nobody Sat Nov 30 05:44:30 2024 Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0870C13D28A; Wed, 11 Sep 2024 09:35:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.191 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726047350; cv=none; b=iHGCS46PUAaT5Z73rmUe4hA2+tTP42t8kXujvAly3oolvfKCvCI9lDuRroF5QWe8GiqMRuOpwg4iZog5OSkLjh7Us/KwynfTgCp2weJZ9N0Ok7liJwxjiq9ub4eH18G5m3ZQ4ijC2iOzWRv3mDEitQYuWq66ItBmXyJnZH6ZKKY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726047350; c=relaxed/simple; bh=sUcjMyqSFlIh5tFWjECBHnTjRvuDJcuVVDhbz0MEWsk=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=lt2bBkQ8PulW6AluRWO1AWzrur5nFdIRj0+zDrFB+lZpMpH3oUoQytLglrT8+vKOk8HpB725xgsZ8/P8sq/5LPaRaEUXbR/2TUlZzOFfllesBg250NEPLkaq4XOEf/MvExeK3P5m2N4WdsYKallF0UQFTjIfjL27P2BKKHOsyYM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.191 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.163]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4X3b231hqVz1HJXh; Wed, 11 Sep 2024 17:32:11 +0800 (CST) Received: from kwepemh500013.china.huawei.com (unknown [7.202.181.146]) by mail.maildlp.com (Postfix) with ESMTPS id 5231C180043; Wed, 11 Sep 2024 17:35:46 +0800 (CST) Received: from huawei.com (10.90.53.73) by kwepemh500013.china.huawei.com (7.202.181.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Wed, 11 Sep 2024 17:35:45 +0800 From: Jinjie Ruan To: , , , , , , , , , , , , , , , , , CC: Subject: [PATCH net RESEND 2/3] net: enetc: Use IRQF_NO_AUTOEN flag in request_irq() Date: Wed, 11 Sep 2024 17:44:44 +0800 Message-ID: <20240911094445.1922476-3-ruanjinjie@huawei.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240911094445.1922476-1-ruanjinjie@huawei.com> References: <20240911094445.1922476-1-ruanjinjie@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemh500013.china.huawei.com (7.202.181.146) Content-Type: text/plain; charset="utf-8" disable_irq() after request_irq() still has a time gap in which interrupts can come. request_irq() with IRQF_NO_AUTOEN flag will disable IRQ auto-enable when request IRQ. Fixes: bbb96dc7fa1a ("enetc: Factor out the traffic start/stop procedures") Signed-off-by: Jinjie Ruan --- v1 -> RESEND - Put wireless into another patch set. --- drivers/net/ethernet/freescale/enetc/enetc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/freescale/enetc/enetc.c b/drivers/net/eth= ernet/freescale/enetc/enetc.c index 5c45f42232d3..f04f42ea60c0 100644 --- a/drivers/net/ethernet/freescale/enetc/enetc.c +++ b/drivers/net/ethernet/freescale/enetc/enetc.c @@ -2305,12 +2305,11 @@ static int enetc_setup_irqs(struct enetc_ndev_priv = *priv) =20 snprintf(v->name, sizeof(v->name), "%s-rxtx%d", priv->ndev->name, i); - err =3D request_irq(irq, enetc_msix, 0, v->name, v); + err =3D request_irq(irq, enetc_msix, IRQF_NO_AUTOEN, v->name, v); if (err) { dev_err(priv->dev, "request_irq() failed!\n"); goto irq_err; } - disable_irq(irq); =20 v->tbier_base =3D hw->reg + ENETC_BDR(TX, 0, ENETC_TBIER); v->rbier =3D hw->reg + ENETC_BDR(RX, i, ENETC_RBIER); --=20 2.34.1 From nobody Sat Nov 30 05:44:30 2024 Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E0190183CC8; Wed, 11 Sep 2024 09:35:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.190 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726047357; cv=none; b=VLJWuWhbQwjqfUI6fcswLX+Fwy/zNazppgHgiOWWY8FCFmMOo0pWeX9QpOauNeOwKOzRQyls+herfCKbn3s3LYSvLvsQrhGbXJy2NX0wITLMHzewvLIxHIrILgUwrsuw3QLuSIPtrqI+7GRnJEdJilFSrDFYHRwle16kj/OohKc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726047357; c=relaxed/simple; bh=8v4X2mR/K7wYuo7N7TApXzmz7OcsAcfPXqyy9IePGH0=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=RjTIaXKLSa4b+qUR/xLCpS1jii9uoB9V0N4SoN0+HId5RcGqti+KM4fU/GeFKI/EXD9Pyxm4i+P0Ei4s4AwtVce6Ddnx9OTS3gv7rgvyz15pWXdeYSTZpSt0nh3kDSzeFwq0L/mWUbInUNANWOLbWsLMBRYDZH4DxB9g6ya2888= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.190 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.163.44]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4X3b650dt8z20ng4; Wed, 11 Sep 2024 17:35:41 +0800 (CST) Received: from kwepemh500013.china.huawei.com (unknown [7.202.181.146]) by mail.maildlp.com (Postfix) with ESMTPS id 0111714010C; Wed, 11 Sep 2024 17:35:47 +0800 (CST) Received: from huawei.com (10.90.53.73) by kwepemh500013.china.huawei.com (7.202.181.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Wed, 11 Sep 2024 17:35:46 +0800 From: Jinjie Ruan To: , , , , , , , , , , , , , , , , , CC: Subject: [PATCH net RESEND 3/3] nfp: Use IRQF_NO_AUTOEN flag in request_irq() Date: Wed, 11 Sep 2024 17:44:45 +0800 Message-ID: <20240911094445.1922476-4-ruanjinjie@huawei.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240911094445.1922476-1-ruanjinjie@huawei.com> References: <20240911094445.1922476-1-ruanjinjie@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemh500013.china.huawei.com (7.202.181.146) Content-Type: text/plain; charset="utf-8" disable_irq() after request_irq() still has a time gap in which interrupts can come. request_irq() with IRQF_NO_AUTOEN flag will disable IRQ auto-enable when request IRQ. Reviewed-by: Louis Peens Signed-off-by: Jinjie Ruan --- v1 -> RESEND - Put wireless into another patch set. - Add reviewed-by. --- drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c b/drivers/= net/ethernet/netronome/nfp/nfp_net_common.c index 182ba0a8b095..6e0929af0f72 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c +++ b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c @@ -821,14 +821,13 @@ nfp_net_prepare_vector(struct nfp_net *nn, struct nfp= _net_r_vector *r_vec, =20 snprintf(r_vec->name, sizeof(r_vec->name), "%s-rxtx-%d", nfp_net_name(nn), idx); - err =3D request_irq(r_vec->irq_vector, r_vec->handler, 0, r_vec->name, - r_vec); + err =3D request_irq(r_vec->irq_vector, r_vec->handler, IRQF_NO_AUTOEN, + r_vec->name, r_vec); if (err) { nfp_net_napi_del(&nn->dp, r_vec); nn_err(nn, "Error requesting IRQ %d\n", r_vec->irq_vector); return err; } - disable_irq(r_vec->irq_vector); =20 irq_set_affinity_hint(r_vec->irq_vector, &r_vec->affinity_mask); =20 --=20 2.34.1