Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e47c222b22cd53c317a5573e1dc5f9e0cbd46380
Commit:     e47c222b22cd53c317a5573e1dc5f9e0cbd46380
Parent:     db6ccbb61c1291c8aaefadcc8304444f27eeb88d
Author:     Russell King <[EMAIL PROTECTED]>
AuthorDate: Mon Jan 8 16:42:51 2007 +0000
Committer:  Russell King <[EMAIL PROTECTED]>
CommitDate: Mon Jan 8 19:49:51 2007 +0000

    [ARM] Fix potential MMCI bug
    
    The MMCI driver might end up aborting the initial command and leaving
    the data part of the command sequence still in place.  Avoid this
    problem by ensuring that any data sequence is properly cleared out
    when a command completes.
    
    Signed-off-by: Russell King <[EMAIL PROTECTED]>
---
 drivers/mmc/mmci.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/mmc/mmci.c b/drivers/mmc/mmci.c
index e9b80e9..ccfe656 100644
--- a/drivers/mmc/mmci.c
+++ b/drivers/mmc/mmci.c
@@ -42,6 +42,8 @@ mmci_request_end(struct mmci_host *host, struct mmc_request 
*mrq)
 {
        writel(0, host->base + MMCICOMMAND);
 
+       BUG_ON(host->data);
+
        host->mrq = NULL;
        host->cmd = NULL;
 
@@ -198,6 +200,8 @@ mmci_cmd_irq(struct mmci_host *host, struct mmc_command 
*cmd,
        }
 
        if (!cmd->data || cmd->error != MMC_ERR_NONE) {
+               if (host->data)
+                       mmci_stop_data(host);
                mmci_request_end(host, cmd->mrq);
        } else if (!(cmd->data->flags & MMC_DATA_READ)) {
                mmci_start_data(host, cmd->data);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to