* [PATCH 3/3] mmc: dw_mmc: fix error handling in PIO mode
@ 2012-08-01 0:30 Seungwon Jeon
2012-08-08 3:21 ` Chris Ball
0 siblings, 1 reply; 2+ messages in thread
From: Seungwon Jeon @ 2012-08-01 0:30 UTC (permalink / raw)
To: linux-mmc
Cc: 'Chris Ball', 'Will Newton',
'James Hogan', 'Jaehoon Chung'
Data transfer will be continued until all the bytes are transmitted,
even if data crc error occurs during a multiple-block data transfer.
This means RXDR/TXDR interrupts will occurs until data transfer is
terminated. Early setting of host->sg to NULL prevents going into
xxx_data_pio functions, hence permanent unhandled RXDR/TXDR interrupts
occurs. And checking error interrupt status in the xxx_data_pio functions
is no need because dw_mci_interrupt does do the same. This patch also
removes it.
Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
---
drivers/mmc/host/dw_mmc.c | 29 ++---------------------------
1 files changed, 2 insertions(+), 27 deletions(-)
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 1a5db20..cf8511b 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -1429,22 +1429,10 @@ static void dw_mci_read_data_pio(struct dw_mci *host)
nbytes += len;
remain -= len;
} while (remain);
- sg_miter->consumed = offset;
+ sg_miter->consumed = offset;
status = mci_readl(host, MINTSTS);
mci_writel(host, RINTSTS, SDMMC_INT_RXDR);
- if (status & DW_MCI_DATA_ERROR_FLAGS) {
- host->data_status = status;
- data->bytes_xfered += nbytes;
- sg_miter_stop(sg_miter);
- host->sg = NULL;
- smp_wmb();
-
- set_bit(EVENT_DATA_ERROR, &host->pending_events);
-
- tasklet_schedule(&host->tasklet);
- return;
- }
} while (status & SDMMC_INT_RXDR); /*if the RXDR is ready read again*/
data->bytes_xfered += nbytes;
@@ -1497,23 +1485,10 @@ static void dw_mci_write_data_pio(struct dw_mci *host)
nbytes += len;
remain -= len;
} while (remain);
- sg_miter->consumed = offset;
+ sg_miter->consumed = offset;
status = mci_readl(host, MINTSTS);
mci_writel(host, RINTSTS, SDMMC_INT_TXDR);
- if (status & DW_MCI_DATA_ERROR_FLAGS) {
- host->data_status = status;
- data->bytes_xfered += nbytes;
- sg_miter_stop(sg_miter);
- host->sg = NULL;
-
- smp_wmb();
-
- set_bit(EVENT_DATA_ERROR, &host->pending_events);
-
- tasklet_schedule(&host->tasklet);
- return;
- }
} while (status & SDMMC_INT_TXDR); /* if TXDR write again */
data->bytes_xfered += nbytes;
--
1.7.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 3/3] mmc: dw_mmc: fix error handling in PIO mode
2012-08-01 0:30 [PATCH 3/3] mmc: dw_mmc: fix error handling in PIO mode Seungwon Jeon
@ 2012-08-08 3:21 ` Chris Ball
0 siblings, 0 replies; 2+ messages in thread
From: Chris Ball @ 2012-08-08 3:21 UTC (permalink / raw)
To: Seungwon Jeon
Cc: linux-mmc, 'Will Newton', 'James Hogan',
'Jaehoon Chung'
Hi,
On Tue, Jul 31 2012, Seungwon Jeon wrote:
> Data transfer will be continued until all the bytes are transmitted,
> even if data crc error occurs during a multiple-block data transfer.
> This means RXDR/TXDR interrupts will occurs until data transfer is
> terminated. Early setting of host->sg to NULL prevents going into
> xxx_data_pio functions, hence permanent unhandled RXDR/TXDR interrupts
> occurs. And checking error interrupt status in the xxx_data_pio functions
> is no need because dw_mci_interrupt does do the same. This patch also
> removes it.
>
> Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
Thanks, pushed to mmc-next for 3.7.
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-08-08 3:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-01 0:30 [PATCH 3/3] mmc: dw_mmc: fix error handling in PIO mode Seungwon Jeon
2012-08-08 3:21 ` Chris Ball
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).