Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 255206
b: refs/heads/master
c: 94dd5b3
h: refs/heads/master
v: v3
  • Loading branch information
James Hogan authored and Chris Ball committed Jul 20, 2011
1 parent 1081e2e commit e7fa88b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 55c5efbc0dbcb20b7f0d264d172ab376494d79a1
refs/heads/master: 94dd5b3371c989b32685a00a54cba7bb530f864d
12 changes: 11 additions & 1 deletion trunk/drivers/mmc/host/dw_mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ static void dw_mci_tasklet_func(unsigned long priv)
struct mmc_command *cmd;
enum dw_mci_state state;
enum dw_mci_state prev_state;
u32 status;
u32 status, ctrl;

spin_lock(&host->lock);

Expand Down Expand Up @@ -929,6 +929,16 @@ static void dw_mci_tasklet_func(unsigned long priv)
status);
data->error = -EIO;
}
/*
* After an error, there may be data lingering
* in the FIFO, so reset it - doing so
* generates a block interrupt, hence setting
* the scatter-gather pointer to NULL.
*/
host->sg = NULL;
ctrl = mci_readl(host, CTRL);
ctrl |= SDMMC_CTRL_FIFO_RESET;
mci_writel(host, CTRL, ctrl);
} else {
data->bytes_xfered = data->blocks * data->blksz;
data->error = 0;
Expand Down

0 comments on commit e7fa88b

Please sign in to comment.