Patch "can: flexcan: flexcan_remove(): disable wakeup completely" has been added to the 5.9-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

    can: flexcan: flexcan_remove(): disable wakeup completely

to the 5.9-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:
     can-flexcan-flexcan_remove-disable-wakeup-completely.patch
and it can be found in the queue-5.9 subdirectory.

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



commit 8ea425f85d44db83e6aad6821baeb0d91a959046
Author: Joakim Zhang <qiangqing.zhang@xxxxxxx>
Date:   Wed Oct 21 02:45:27 2020 +0800

    can: flexcan: flexcan_remove(): disable wakeup completely
    
    [ Upstream commit ab07ff1c92fa60f29438e655a1b4abab860ed0b6 ]
    
    With below sequence, we can see wakeup default is enabled after re-load module,
    if it was enabled before, so we need disable wakeup in flexcan_remove().
    
    | # cat /sys/bus/platform/drivers/flexcan/5a8e0000.can/power/wakeup
    | disabled
    | # echo enabled > /sys/bus/platform/drivers/flexcan/5a8e0000.can/power/wakeup
    | # cat /sys/bus/platform/drivers/flexcan/5a8e0000.can/power/wakeup
    | enabled
    | # rmmod flexcan
    | # modprobe flexcan
    | # cat /sys/bus/platform/drivers/flexcan/5a8e0000.can/power/wakeup
    | enabled
    
    Fixes: de3578c198c6 ("can: flexcan: add self wakeup support")
    Fixes: 915f9666421c ("can: flexcan: add support for DT property 'wakeup-source'")
    Signed-off-by: Joakim Zhang <qiangqing.zhang@xxxxxxx>
    Link: https://lore.kernel.org/r/20201020184527.8190-1-qiangqing.zhang@xxxxxxx
    [mkl: streamlined commit message]
    Signed-off-by: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
index bc504e09f2259..a330d6c56242e 100644
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -1695,6 +1695,8 @@ static int flexcan_remove(struct platform_device *pdev)
 {
 	struct net_device *dev = platform_get_drvdata(pdev);
 
+	device_set_wakeup_enable(&pdev->dev, false);
+	device_set_wakeup_capable(&pdev->dev, false);
 	unregister_flexcandev(dev);
 	pm_runtime_disable(&pdev->dev);
 	free_candev(dev);



[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