Patch "bus: ti-sysc: Fix warning on unbind if reset is not deasserted" has been added to the 4.19-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

    bus: ti-sysc: Fix warning on unbind if reset is not deasserted

to the 4.19-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:
     bus-ti-sysc-fix-warning-on-unbind-if-reset-is-not-de.patch
and it can be found in the queue-4.19 subdirectory.

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



commit 3abc0c3fb8b28d9b5222bba4d951bfc1301322ef
Author: Tony Lindgren <tony@xxxxxxxxxxx>
Date:   Thu Feb 18 13:06:57 2021 +0200

    bus: ti-sysc: Fix warning on unbind if reset is not deasserted
    
    [ Upstream commit a7b5d7c4969aba8d1f04c29048906abaa71fb6a9 ]
    
    We currently get thefollowing on driver unbind if a reset is configured
    and asserted:
    
    WARNING: CPU: 0 PID: 993 at drivers/reset/core.c:432 reset_control_assert
    ...
    (reset_control_assert) from [<c0fecda8>] (sysc_remove+0x190/0x1e4)
    (sysc_remove) from [<c0a2bb58>] (platform_remove+0x24/0x3c)
    (platform_remove) from [<c0a292fc>] (__device_release_driver+0x154/0x214)
    (__device_release_driver) from [<c0a2a210>] (device_driver_detach+0x3c/0x8c)
    (device_driver_detach) from [<c0a27d64>] (unbind_store+0x60/0xd4)
    (unbind_store) from [<c0546bec>] (kernfs_fop_write_iter+0x10c/0x1cc)
    
    Let's fix it by checking the reset status.
    
    Signed-off-by: Tony Lindgren <tony@xxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
index 54c8c8644df2..b6a278183d82 100644
--- a/drivers/bus/ti-sysc.c
+++ b/drivers/bus/ti-sysc.c
@@ -1814,7 +1814,9 @@ static int sysc_remove(struct platform_device *pdev)
 
 	pm_runtime_put_sync(&pdev->dev);
 	pm_runtime_disable(&pdev->dev);
-	reset_control_assert(ddata->rsts);
+
+	if (!reset_control_status(ddata->rsts))
+		reset_control_assert(ddata->rsts);
 
 unprepare:
 	sysc_unprepare(ddata);



[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