* [PATCH] mmc: dw_mmc: protect a sequence of request and request-done.
@ 2011-06-20 8:24 Seungwon Jeon
2011-06-20 9:15 ` Will Newton
0 siblings, 1 reply; 3+ messages in thread
From: Seungwon Jeon @ 2011-06-20 8:24 UTC (permalink / raw)
To: linux-samsung-soc, linux-mmc; +Cc: akpm, cjb, kgene.kim, Seungwon Jeon
Response timeout(RTO), Response crc error(RCRC) and Response error(RE)
signals come with command done(CD) and can be raised preceding command
done(CD). That is these error interrupts and CD can be handled in
separate dw_mci_interrupt(). If mmc_request_done() is called because of
response timeout before command done is occured, next request can be
sent, but CD of current request is not finished. This can bring about
a broken sequence of request and request-done.
And Data error interrupt(DRTO, DCRC, SBE, EBE) and data transfer
over(DTO) are same reanson.
Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
---
drivers/mmc/host/dw_mmc.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 1ca830c..22be372 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -1202,7 +1202,6 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id)
host->cmd_status = status;
smp_wmb();
set_bit(EVENT_CMD_COMPLETE, &host->pending_events);
- tasklet_schedule(&host->tasklet);
}
if (pending & DW_MCI_DATA_ERROR_FLAGS) {
@@ -1211,7 +1210,9 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id)
host->data_status = status;
smp_wmb();
set_bit(EVENT_DATA_ERROR, &host->pending_events);
- tasklet_schedule(&host->tasklet);
+ if (!(pending & (SDMMC_INT_DTO | SDMMC_INT_DCRC |
+ SDMMC_INT_SBE | SDMMC_INT_EBE)))
+ tasklet_schedule(&host->tasklet);
}
if (pending & SDMMC_INT_DATA_OVER) {
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mmc: dw_mmc: protect a sequence of request and request-done.
2011-06-20 8:24 [PATCH] mmc: dw_mmc: protect a sequence of request and request-done Seungwon Jeon
@ 2011-06-20 9:15 ` Will Newton
2011-06-20 18:58 ` Chris Ball
0 siblings, 1 reply; 3+ messages in thread
From: Will Newton @ 2011-06-20 9:15 UTC (permalink / raw)
To: Seungwon Jeon; +Cc: linux-samsung-soc, linux-mmc, akpm, cjb, kgene.kim
On Mon, Jun 20, 2011 at 9:24 AM, Seungwon Jeon <tgih.jun@samsung.com> wrote:
> Response timeout(RTO), Response crc error(RCRC) and Response error(RE)
> signals come with command done(CD) and can be raised preceding command
> done(CD). That is these error interrupts and CD can be handled in
> separate dw_mci_interrupt(). If mmc_request_done() is called because of
> response timeout before command done is occured, next request can be
> sent, but CD of current request is not finished. This can bring about
> a broken sequence of request and request-done.
>
> And Data error interrupt(DRTO, DCRC, SBE, EBE) and data transfer
> over(DTO) are same reanson.
>
> Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
Acked-by: Will Newton <will.newton@imgtec.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mmc: dw_mmc: protect a sequence of request and request-done.
2011-06-20 9:15 ` Will Newton
@ 2011-06-20 18:58 ` Chris Ball
0 siblings, 0 replies; 3+ messages in thread
From: Chris Ball @ 2011-06-20 18:58 UTC (permalink / raw)
To: Will Newton; +Cc: Seungwon Jeon, linux-samsung-soc, linux-mmc, akpm, kgene.kim
Hi,
On Mon, Jun 20 2011, Will Newton wrote:
> On Mon, Jun 20, 2011 at 9:24 AM, Seungwon Jeon <tgih.jun@samsung.com> wrote:
>> Response timeout(RTO), Response crc error(RCRC) and Response error(RE)
>> signals come with command done(CD) and can be raised preceding command
>> done(CD). That is these error interrupts and CD can be handled in
>> separate dw_mci_interrupt(). If mmc_request_done() is called because of
>> response timeout before command done is occured, next request can be
>> sent, but CD of current request is not finished. This can bring about
>> a broken sequence of request and request-done.
>>
>> And Data error interrupt(DRTO, DCRC, SBE, EBE) and data transfer
>> over(DTO) are same reanson.
>>
>> Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
>
> Acked-by: Will Newton <will.newton@imgtec.com>
Pushed to mmc-next for 3.1, thanks.
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-06-20 18:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-20 8:24 [PATCH] mmc: dw_mmc: protect a sequence of request and request-done Seungwon Jeon
2011-06-20 9:15 ` Will Newton
2011-06-20 18:58 ` Chris Ball
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox