Patch "mmc: core: sdio: hold retuning if sdio in 1-bit mode" 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

    mmc: core: sdio: hold retuning if sdio in 1-bit mode

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:
     mmc-core-sdio-hold-retuning-if-sdio-in-1-bit-mode.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 8b475cc618b4510c8e218a4fd1b8bcd198371eb8
Author: Haibo Chen <haibo.chen@xxxxxxx>
Date:   Wed Aug 30 17:39:22 2023 +0800

    mmc: core: sdio: hold retuning if sdio in 1-bit mode
    
    [ Upstream commit 32a9cdb8869dc111a0c96cf8e1762be9684af15b ]
    
    tuning only support in 4-bit mode or 8 bit mode, so in 1-bit mode,
    need to hold retuning.
    
    Find this issue when use manual tuning method on imx93. When system
    resume back, SDIO WIFI try to switch back to 4 bit mode, first will
    trigger retuning, and all tuning command failed.
    
    Signed-off-by: Haibo Chen <haibo.chen@xxxxxxx>
    Acked-by: Adrian Hunter <adrian.hunter@xxxxxxxxx>
    Fixes: dfa13ebbe334 ("mmc: host: Add facility to support re-tuning")
    Cc: stable@xxxxxxxxxxxxxxx
    Link: https://lore.kernel.org/r/20230830093922.3095850-1-haibo.chen@xxxxxxx
    Signed-off-by: Ulf Hansson <ulf.hansson@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c
index 5f6865717c9b4..4fdb5dd9748fa 100644
--- a/drivers/mmc/core/sdio.c
+++ b/drivers/mmc/core/sdio.c
@@ -983,8 +983,14 @@ static int mmc_sdio_resume(struct mmc_host *host)
 		}
 		err = mmc_sdio_reinit_card(host, 0);
 	} else if (mmc_card_wake_sdio_irq(host)) {
-		/* We may have switched to 1-bit mode during suspend */
+		/*
+		 * We may have switched to 1-bit mode during suspend,
+		 * need to hold retuning, because tuning only supprt
+		 * 4-bit mode or 8 bit mode.
+		 */
+		mmc_retune_hold_now(host);
 		err = sdio_enable_4bit_bus(host->card);
+		mmc_retune_release(host);
 	}
 
 	if (err)



[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