[PATCH wireless v2 1/3] wifi: p54: Use IRQF_NO_AUTOEN flag in request_irq()

Jinjie Ruan posted 3 patches 2 months, 2 weeks ago
[PATCH wireless v2 1/3] wifi: p54: Use IRQF_NO_AUTOEN flag in request_irq()
Posted by Jinjie Ruan 2 months, 2 weeks ago
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: cd8d3d321285 ("p54spi: p54spi driver")
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
---
v2:
- Add fix tag.
- Wireless patches go to wireless-next, submit them in a separate patchset.
---
 drivers/net/wireless/intersil/p54/p54spi.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/wireless/intersil/p54/p54spi.c b/drivers/net/wireless/intersil/p54/p54spi.c
index d33a994906a7..27f44a9f0bc1 100644
--- a/drivers/net/wireless/intersil/p54/p54spi.c
+++ b/drivers/net/wireless/intersil/p54/p54spi.c
@@ -624,7 +624,7 @@ static int p54spi_probe(struct spi_device *spi)
 	gpio_direction_input(p54spi_gpio_irq);
 
 	ret = request_irq(gpio_to_irq(p54spi_gpio_irq),
-			  p54spi_interrupt, 0, "p54spi",
+			  p54spi_interrupt, IRQF_NO_AUTOEN, "p54spi",
 			  priv->spi);
 	if (ret < 0) {
 		dev_err(&priv->spi->dev, "request_irq() failed");
@@ -633,8 +633,6 @@ static int p54spi_probe(struct spi_device *spi)
 
 	irq_set_irq_type(gpio_to_irq(p54spi_gpio_irq), IRQ_TYPE_EDGE_RISING);
 
-	disable_irq(gpio_to_irq(p54spi_gpio_irq));
-
 	INIT_WORK(&priv->work, p54spi_work);
 	init_completion(&priv->fw_comp);
 	INIT_LIST_HEAD(&priv->tx_pending);
-- 
2.34.1
Re: [PATCH wireless v2 1/3] wifi: p54: Use IRQF_NO_AUTOEN flag in request_irq()
Posted by Kalle Valo 2 months, 1 week ago
Jinjie Ruan <ruanjinjie@huawei.com> 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.
> 
> Fixes: cd8d3d321285 ("p54spi: p54spi driver")
> Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>

3 patches applied to wireless-next.git, thanks.

bcd1371bd85e wifi: p54: Use IRQF_NO_AUTOEN flag in request_irq()
9a98dd48b6d8 wifi: mwifiex: Use IRQF_NO_AUTOEN flag in request_irq()
5a4d42c1688c wifi: wl1251: Use IRQF_NO_AUTOEN flag in request_irq()

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20240910124314.698896-2-ruanjinjie@huawei.com/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches