]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: 6642/1: mmci: calculate remaining bytes at error correctly
authorLinus Walleij <linus.walleij@stericsson.com>
Thu, 27 Jan 2011 16:44:34 +0000 (17:44 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 27 Jan 2011 22:06:12 +0000 (22:06 +0000)
commit863ffe1eecfbefefb6b5ff3a84f9983d46660071
tree495864e9dccb92ea383e2d6608c4f291989d8c29
parent44ccb80f43369d3bef47e3566dc65f4003d2abe4
ARM: 6642/1: mmci: calculate remaining bytes at error correctly

The MMCIDATACNT register contain the number of byte left at error
not the number of words, so loose the << 2 thing. Further if CRC
fails on the first block, we may end up with a negative number
of transferred bytes which is not good, and the formula was in
wrong order.

Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
drivers/mmc/host/mmci.c