Patch "wifi: wilc1000: Do not operate uninitialized hardware during suspend/resume" has been added to the 6.11-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

    wifi: wilc1000: Do not operate uninitialized hardware during suspend/resume

to the 6.11-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:
     wifi-wilc1000-do-not-operate-uninitialized-hardware-.patch
and it can be found in the queue-6.11 subdirectory.

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



commit 81f1e1044d82f43e0283f02d1f5cd4fa2fa66265
Author: Marek Vasut <marex@xxxxxxx>
Date:   Wed Aug 21 20:36:03 2024 +0200

    wifi: wilc1000: Do not operate uninitialized hardware during suspend/resume
    
    [ Upstream commit b0dc7018477e8fbb7e40c908c29cf663d06b17a7 ]
    
    In case the hardware is not initialized, do not operate it during
    suspend/resume cycle, the hardware is already off so there is no
    reason to access it.
    
    In fact, wilc_sdio_enable_interrupt() in the resume callback does
    interfere with the same call when initializing the hardware after
    resume and makes such initialization after resume fail. Fix this
    by not operating uninitialized hardware during suspend/resume.
    
    Signed-off-by: Marek Vasut <marex@xxxxxxx>
    Reviewed-by: Alexis Lothoré <alexis.lothore@xxxxxxxxxxx>
    Signed-off-by: Kalle Valo <kvalo@xxxxxxxxxx>
    Link: https://patch.msgid.link/20240821183639.163187-1-marex@xxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/wireless/microchip/wilc1000/sdio.c b/drivers/net/wireless/microchip/wilc1000/sdio.c
index 0043f7a0fdf97..7999aeb76901f 100644
--- a/drivers/net/wireless/microchip/wilc1000/sdio.c
+++ b/drivers/net/wireless/microchip/wilc1000/sdio.c
@@ -977,6 +977,9 @@ static int wilc_sdio_suspend(struct device *dev)
 
 	dev_info(dev, "sdio suspend\n");
 
+	if (!wilc->initialized)
+		return 0;
+
 	if (!IS_ERR(wilc->rtc_clk))
 		clk_disable_unprepare(wilc->rtc_clk);
 
@@ -999,6 +1002,10 @@ static int wilc_sdio_resume(struct device *dev)
 	struct wilc *wilc = sdio_get_drvdata(func);
 
 	dev_info(dev, "sdio resume\n");
+
+	if (!wilc->initialized)
+		return 0;
+
 	wilc_sdio_init(wilc, true);
 	wilc_sdio_enable_interrupt(wilc);
 




[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