Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2b061973404802fb87db93175b856ee0dfbe38e4
Commit:     2b061973404802fb87db93175b856ee0dfbe38e4
Parent:     be760a9de881d84994403bb93177bcb95319c4cb
Author:     Pierre Ossman <[EMAIL PROTECTED]>
AuthorDate: Sun Aug 12 13:13:24 2007 +0200
Committer:  Pierre Ossman <[EMAIL PROTECTED]>
CommitDate: Thu Aug 23 06:27:44 2007 +0200

    sdhci: be more cautious about block count register
    
    The block count register shouldn't be trusted for single block transfers,
    so avoid using it completely when calculating transferred bytes.
    
    Signed-off-by: Pierre Ossman <[EMAIL PROTECTED]>
---
 drivers/mmc/host/sdhci.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index f2bc87a..7181e86 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -477,8 +477,8 @@ static void sdhci_finish_data(struct sdhci_host *host)
        /*
         * Controller doesn't count down when in single block mode.
         */
-       if ((data->blocks == 1) && (data->error == MMC_ERR_NONE))
-               blocks = 0;
+       if (data->blocks == 1)
+               blocks = (data->error == MMC_ERR_NONE) ? 0 : 1;
        else
                blocks = readw(host->ioaddr + SDHCI_BLOCK_COUNT);
        data->bytes_xfered = data->blksz * (data->blocks - blocks);
-
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