aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKlaus Doth <kdlnx@doth.eu>2020-05-22 12:56:04 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-05-22 13:27:38 +0200
commit7a839dbab1be59f5ed3b3b046de29e166784c9b4 (patch)
tree70e1058a613930d67ad5c5e10e480944dae9c15b
parent1ea34b2988554af8a83a44a0a8e5aaa9e5a60c64 (diff)
downloaddma-buf-7a839dbab1be59f5ed3b3b046de29e166784c9b4.tar.gz
misc: rtsx: Add short delay after exit from ASPM
DMA transfers to and from the SD card stall for 10 seconds and run into timeout on RTS5260 card readers after ASPM was enabled. Adding a short msleep after disabling ASPM fixes the issue on several Dell Precision 7530/7540 systems I tested. This function is only called when waking up after the chip went into power-save after not transferring data for a few seconds. The added msleep does therefore not change anything in data transfer speed or induce any excessive waiting while data transfers are running, or the chip is sleeping. Only the transition from sleep to active is affected. Signed-off-by: Klaus Doth <kdlnx@doth.eu> Cc: stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/4434eaa7-2ee3-a560-faee-6cee63ebd6d4@doth.eu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/misc/cardreader/rtsx_pcr.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/misc/cardreader/rtsx_pcr.c b/drivers/misc/cardreader/rtsx_pcr.c
index 06038b325b023a..55da6428ceb019 100644
--- a/drivers/misc/cardreader/rtsx_pcr.c
+++ b/drivers/misc/cardreader/rtsx_pcr.c
@@ -142,6 +142,9 @@ static void rtsx_comm_pm_full_on(struct rtsx_pcr *pcr)
rtsx_disable_aspm(pcr);
+ /* Fixes DMA transfer timout issue after disabling ASPM on RTS5260 */
+ msleep(1);
+
if (option->ltr_enabled)
rtsx_set_ltr_latency(pcr, option->ltr_active_latency);