[RFC PATCH] mmc: disable retuning when tuning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It might be that something goes wrong during tuning so the MMC core will
immediately trigger a retune. In our case it was:

 - we sent a tuning block
 - there was an error so we need to send an abort cmd to the eMMC
 - the abort cmd had a CRC error
 - retune was set by the MMC core

This lead to a vicious circle causing a performance regression of 75%.
So, disable retuning while we tune. Let the tuning complete and see then
if it worked out or not.

Reported-by Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx>
Signed-off-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
---

Hi Ulf, this patch is marked as RFC because I think this is a generic
issue. Lots of things could happen in the driver callback which cause a
retune, so I'd think it makes sense to deactivate it globally here. If
you think this is a driver specific issue, just let me know. I can
provide a small patch to create the issue for SDHI hardware, created
by Shimoda-san. We couldn't think of an easy way to reproduce it with
the fault injector, sadly. Let me know if you want to see that patch.

 drivers/mmc/core/core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index b039dcff17f8..54f0814f110c 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -927,6 +927,8 @@ int mmc_execute_tuning(struct mmc_card *card)
 	if (!host->ops->execute_tuning)
 		return 0;
 
+	mmc_retune_disable(host);
+
 	if (host->cqe_on)
 		host->cqe_ops->cqe_off(host);
 
-- 
2.30.2




[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux