Patch "pmdomain: bcm: bcm2835-power: check if the ASB register is equal to enable" has been added to the 6.5-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

    pmdomain: bcm: bcm2835-power: check if the ASB register is equal to enable

to the 6.5-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:
     pmdomain-bcm-bcm2835-power-check-if-the-asb-register.patch
and it can be found in the queue-6.5 subdirectory.

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



commit 6ccc518f100b52f3209ada89e0697bd9c56e692b
Author: Maíra Canal <mcanal@xxxxxxxxxx>
Date:   Tue Oct 24 07:10:40 2023 -0300

    pmdomain: bcm: bcm2835-power: check if the ASB register is equal to enable
    
    [ Upstream commit 2e75396f1df61e1f1d26d0d703fc7292c4ae4371 ]
    
    The commit c494a447c14e ("soc: bcm: bcm2835-power: Refactor ASB control")
    refactored the ASB control by using a general function to handle both
    the enable and disable. But this patch introduced a subtle regression:
    we need to check if !!(readl(base + reg) & ASB_ACK) == enable, not just
    check if (readl(base + reg) & ASB_ACK) == true.
    
    Currently, this is causing an invalid register state in V3D when
    unloading and loading the driver, because `bcm2835_asb_disable()` will
    return -ETIMEDOUT and `bcm2835_asb_power_off()` will fail to disable the
    ASB slave for V3D.
    
    Fixes: c494a447c14e ("soc: bcm: bcm2835-power: Refactor ASB control")
    Signed-off-by: Maíra Canal <mcanal@xxxxxxxxxx>
    Reviewed-by: Florian Fainelli <florian.fainelli@xxxxxxxxxxxx>
    Reviewed-by: Stefan Wahren <stefan.wahren@xxxxxxxx>
    Cc: stable@xxxxxxxxxxxxxxx
    Link: https://lore.kernel.org/r/20231024101251.6357-2-mcanal@xxxxxxxxxx
    Signed-off-by: Ulf Hansson <ulf.hansson@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/soc/bcm/bcm2835-power.c b/drivers/soc/bcm/bcm2835-power.c
index 1a179d4e011cf..d2f0233cb6206 100644
--- a/drivers/soc/bcm/bcm2835-power.c
+++ b/drivers/soc/bcm/bcm2835-power.c
@@ -175,7 +175,7 @@ static int bcm2835_asb_control(struct bcm2835_power *power, u32 reg, bool enable
 	}
 	writel(PM_PASSWORD | val, base + reg);
 
-	while (readl(base + reg) & ASB_ACK) {
+	while (!!(readl(base + reg) & ASB_ACK) == enable) {
 		cpu_relax();
 		if (ktime_get_ns() - start >= 1000)
 			return -ETIMEDOUT;



[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