public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: dw_mmc: fix status error for Kingston brand SD cards
@ 2014-03-27 22:00 dinguyen
  2014-03-28 12:32 ` Seungwon Jeon
  0 siblings, 1 reply; 4+ messages in thread
From: dinguyen @ 2014-03-27 22:00 UTC (permalink / raw)
  To: tgih.jun, jh80.chung; +Cc: dinh.linux, linux-mmc, Dinh Nguyen

From: Dinh Nguyen <dinguyen@altera.com>

commits [90c2143a8f mmc: dw_mmc: guarantee stop-abort cmd in data errors]
and [e352c813110 mmc: dw_mmc: rework the code related to cmd/data completion]
cause the SD/MMC DMA interface to stop working on Kingston brand SD cards.

---
Hi Seungwon,

I am seeing this error on v3.13 kernel of the dw_mmc driver:

mmc0: problem reading SD Status register.
mmc0: error -110 whilst initialising SD card

I only see this error on a Kingston brand card, although I have heard reports
that it also fails a Samsung card. Also it only fails when with
CONFIG_MMC_DW_IDMAC=y.

The patch below seems to fix it for me. Any chance you have seen this error?

Dinh
---
 drivers/mmc/host/dw_mmc.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 7833002..7dcaa30 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -1312,7 +1312,8 @@ static void dw_mci_tasklet_func(unsigned long priv)
 			if (test_and_clear_bit(EVENT_DATA_ERROR,
 					       &host->pending_events)) {
 				dw_mci_stop_dma(host);
-				send_stop_abort(host, data);
+				if (data->stop)
+					send_stop_abort(host, data);
 				state = STATE_DATA_ERROR;
 				break;
 			}
@@ -1334,6 +1335,11 @@ static void dw_mci_tasklet_func(unsigned long priv)
 			set_bit(EVENT_DATA_COMPLETE, &host->completed_events);
 			err = dw_mci_data_complete(host, data);
 
+			if (!data->stop) {
+				dw_mci_request_end(host, host->mrq);
+				goto unlock;
+			}
+
 			if (!err) {
 				if (!data->stop || mrq->sbc) {
 					if (mrq->sbc)
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-04-14  8:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-27 22:00 [PATCH] mmc: dw_mmc: fix status error for Kingston brand SD cards dinguyen
2014-03-28 12:32 ` Seungwon Jeon
2014-03-28 15:53   ` Dinh Nguyen
2014-04-14  8:08     ` Jaehoon Chung

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox