diff mbox series

[wpan,RESEND] net: ieee802154: mcr20a: Use IRQF_NO_AUTOEN flag in request_irq()

Message ID 20240911094234.1922418-1-ruanjinjie@huawei.com (mailing list archive)
State Accepted
Headers show
Series [wpan,RESEND] net: ieee802154: mcr20a: Use IRQF_NO_AUTOEN flag in request_irq() | expand

Commit Message

Jinjie Ruan Sept. 11, 2024, 9:42 a.m. UTC
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: 8c6ad9cc5157 ("ieee802154: Add NXP MCR20A IEEE 802.15.4 transceiver driver")
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Acked-by: Stefan Schmidt <stefan@datenfreihafen.org>
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
---
v1 -> RESEND:
- Add Reviewed-by and Acked-by.
- Go through wpan.
---
 drivers/net/ieee802154/mcr20a.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Stefan Schmidt Sept. 13, 2024, 7:28 a.m. UTC | #1
Hello Jinjie Ruan.

On Wed, 11 Sep 2024 17:42:34 +0800, Jinjie Ruan wrote:
> 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.
> 
> 

Applied to wpan/wpan-next.git, thanks!

[1/1] net: ieee802154: mcr20a: Use IRQF_NO_AUTOEN flag in request_irq()
      https://git.kernel.org/wpan/wpan-next/c/ace2b53313556

regards,
Stefan Schmidt
diff mbox series

Patch

diff --git a/drivers/net/ieee802154/mcr20a.c b/drivers/net/ieee802154/mcr20a.c
index 433fb5839203..020d392a98b6 100644
--- a/drivers/net/ieee802154/mcr20a.c
+++ b/drivers/net/ieee802154/mcr20a.c
@@ -1302,16 +1302,13 @@  mcr20a_probe(struct spi_device *spi)
 		irq_type = IRQF_TRIGGER_FALLING;
 
 	ret = devm_request_irq(&spi->dev, spi->irq, mcr20a_irq_isr,
-			       irq_type, dev_name(&spi->dev), lp);
+			       irq_type | IRQF_NO_AUTOEN, dev_name(&spi->dev), lp);
 	if (ret) {
 		dev_err(&spi->dev, "could not request_irq for mcr20a\n");
 		ret = -ENODEV;
 		goto free_dev;
 	}
 
-	/* disable_irq by default and wait for starting hardware */
-	disable_irq(spi->irq);
-
 	ret = ieee802154_register_hw(hw);
 	if (ret) {
 		dev_crit(&spi->dev, "ieee802154_register_hw failed\n");