Patch "hwmon: (lm90) Re-enable interrupts after alert clears" has been added to the 5.15-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

    hwmon: (lm90) Re-enable interrupts after alert clears

to the 5.15-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:
     hwmon-lm90-re-enable-interrupts-after-alert-clears.patch
and it can be found in the queue-5.15 subdirectory.

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



commit feae4d72317cbb8a3145ffbef16924f3646d0ad1
Author: Guenter Roeck <linux@xxxxxxxxxxxx>
Date:   Sat Jan 8 11:37:19 2022 -0800

    hwmon: (lm90) Re-enable interrupts after alert clears
    
    [ Upstream commit bc341a1a98827925082e95db174734fc8bd68af6 ]
    
    If alert handling is broken, interrupts are disabled after an alert and
    re-enabled after the alert clears. However, if there is an interrupt
    handler, this does not apply if alerts were originally disabled and enabled
    when the driver was loaded. In that case, interrupts will stay disabled
    after an alert was handled though the alert handler even after the alert
    condition clears. Address the situation by always re-enabling interrupts
    after the alert condition clears if there is an interrupt handler.
    
    Fixes: 2abdc357c55d9 ("hwmon: (lm90) Unmask hardware interrupt")
    Cc: Dmitry Osipenko <digetx@xxxxxxxxx>
    Signed-off-by: Guenter Roeck <linux@xxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c
index cc5e48fe304b1..e4ecf3440d7cf 100644
--- a/drivers/hwmon/lm90.c
+++ b/drivers/hwmon/lm90.c
@@ -848,7 +848,7 @@ static int lm90_update_device(struct device *dev)
 		 * Re-enable ALERT# output if it was originally enabled and
 		 * relevant alarms are all clear
 		 */
-		if (!(data->config_orig & 0x80) &&
+		if ((client->irq || !(data->config_orig & 0x80)) &&
 		    !(data->alarms & data->alert_alarms)) {
 			if (data->config & 0x80) {
 				dev_dbg(&client->dev, "Re-enabling ALERT#\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