diff mbox series

[V2,2/5] mmc: mmci: avoid fake busy polling in mmci_irq

Message ID 1556264798-18540-3-git-send-email-ludovic.Barre@st.com (mailing list archive)
State New, archived
Headers show
Series mmc: mmci: add busy detect for stm32 sdmmc variant | expand

Commit Message

Ludovic BARRE April 26, 2019, 7:46 a.m. UTC
From: Ludovic Barre <ludovic.barre@st.com>

mmci_irq function loops until the status is totally cleared.
However the busy_detect_flag could occurred even if no busy
response is expected and that busy d0 line is low (like in
cmd11: voltage switch).
Like busy_detect_flag is handled into mmci_cmd_irq this flag
can be always excluded.

Signed-off-by: Ludovic Barre <ludovic.barre@st.com>
---
 drivers/mmc/host/mmci.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index 049f8e3..a040f54 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -1535,9 +1535,10 @@  static irqreturn_t mmci_irq(int irq, void *dev_id)
 		}
 
 		/*
-		 * Don't poll for busy completion in irq context.
+		 * Busy_detect_flag has been handled by mmci_cmd_irq,
+		 * it can be excluded to avoid to poll on it
 		 */
-		if (host->variant->busy_detect && host->busy_status)
+		if (host->variant->busy_detect_flag)
 			status &= ~host->variant->busy_detect_flag;
 
 		ret = 1;