Patch "mfd: tps65010: Use IRQF_NO_AUTOEN flag in request_irq() to fix race" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    mfd: tps65010: Use IRQF_NO_AUTOEN flag in request_irq() to fix race

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     mfd-tps65010-use-irqf_no_autoen-flag-in-request_irq-.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 2b300478d3c214805c73fbf70e0d1165a5a17268
Author: Jinjie Ruan <ruanjinjie@xxxxxxxxxx>
Date:   Thu Sep 12 11:15:30 2024 +0800

    mfd: tps65010: Use IRQF_NO_AUTOEN flag in request_irq() to fix race
    
    [ Upstream commit 2174f9a8c9db50f74df769edd5a4ab822c73b6d2 ]
    
    As the comment said, 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: 72cd799544f2 ("[PATCH] I2C: add i2c driver for TPS6501x")
    Signed-off-by: Jinjie Ruan <ruanjinjie@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240912031530.2211654-1-ruanjinjie@xxxxxxxxxx
    Signed-off-by: Lee Jones <lee@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/mfd/tps65010.c b/drivers/mfd/tps65010.c
index c2afa2e69f42f..35ddffb96ba1a 100644
--- a/drivers/mfd/tps65010.c
+++ b/drivers/mfd/tps65010.c
@@ -548,17 +548,13 @@ static int tps65010_probe(struct i2c_client *client,
 	 */
 	if (client->irq > 0) {
 		status = request_irq(client->irq, tps65010_irq,
-				     IRQF_TRIGGER_FALLING, DRIVER_NAME, tps);
+				     IRQF_TRIGGER_FALLING | IRQF_NO_AUTOEN,
+				     DRIVER_NAME, tps);
 		if (status < 0) {
 			dev_dbg(&client->dev, "can't get IRQ %d, err %d\n",
 					client->irq, status);
 			return status;
 		}
-		/* annoying race here, ideally we'd have an option
-		 * to claim the irq now and enable it later.
-		 * FIXME genirq IRQF_NOAUTOEN now solves that ...
-		 */
-		disable_irq(client->irq);
 		set_bit(FLAG_IRQ_ENABLE, &tps->flags);
 	} else
 		dev_warn(&client->dev, "IRQ not configured!\n");




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux