Patch "mmc: core: Only print retune error when we don't check for card removal" has been added to the 5.10-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: Only print retune error when we don't check for card removal

to the 5.10-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-only-print-retune-error-when-we-don-t-check.patch
and it can be found in the queue-5.10 subdirectory.

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



commit 9b0485c53fffdb27d85c1790abadd790b498040d
Author: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
Date:   Wed Jun 30 06:16:58 2021 +0200

    mmc: core: Only print retune error when we don't check for card removal
    
    [ Upstream commit 8335928849729f8e5f10c1497c67260742f7a8cb ]
    
    Skip printing a retune error when we scan for a removed card because we
    then expect a failed command.
    
    Signed-off-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
    Acked-by: Adrian Hunter <adrian.hunter@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20210630041658.7574-1-wsa+renesas@xxxxxxxxxxxxxxxxxxxx
    [Ulf: Rebased patch]
    Signed-off-by: Ulf Hansson <ulf.hansson@xxxxxxxxxx>
    Stable-dep-of: b3855668d98c ("mmc: sdhci: Add support for "Tuning Error" interrupts")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index d8b38203f0fe9..2a8c7d5631d14 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -940,15 +940,17 @@ int mmc_execute_tuning(struct mmc_card *card)
 		opcode = MMC_SEND_TUNING_BLOCK;
 
 	err = host->ops->execute_tuning(host, opcode);
-
-	if (err) {
-		pr_err("%s: tuning execution failed: %d\n",
-			mmc_hostname(host), err);
-	} else {
+	if (!err) {
 		mmc_retune_clear(host);
 		mmc_retune_enable(host);
+		return 0;
 	}
 
+	/* Only print error when we don't check for card removal */
+	if (!host->detect_change)
+		pr_err("%s: tuning execution failed: %d\n",
+			mmc_hostname(host), err);
+
 	return 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