Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: ieee802154: mcr20a: Use IRQF_NO_AUTOEN flag in request_irq()

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>
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Link: https://lore.kernel.org/20240911094234.1922418-1-ruanjinjie@huawei.com
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>

authored by

Jinjie Ruan and committed by
Stefan Schmidt
09573b1c bff1709b

+1 -4
+1 -4
drivers/net/ieee802154/mcr20a.c
··· 1302 1302 irq_type = IRQF_TRIGGER_FALLING; 1303 1303 1304 1304 ret = devm_request_irq(&spi->dev, spi->irq, mcr20a_irq_isr, 1305 - irq_type, dev_name(&spi->dev), lp); 1305 + irq_type | IRQF_NO_AUTOEN, dev_name(&spi->dev), lp); 1306 1306 if (ret) { 1307 1307 dev_err(&spi->dev, "could not request_irq for mcr20a\n"); 1308 1308 ret = -ENODEV; 1309 1309 goto free_dev; 1310 1310 } 1311 - 1312 - /* disable_irq by default and wait for starting hardware */ 1313 - disable_irq(spi->irq); 1314 1311 1315 1312 ret = ieee802154_register_hw(hw); 1316 1313 if (ret) {