]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: sdhci: work around broken dma boundary behavior
authorMikko Vinni <mmvinni@yahoo.com>
Tue, 12 Apr 2011 13:36:18 +0000 (09:36 -0400)
committerChris Ball <cjb@laptop.org>
Wed, 25 May 2011 01:01:29 +0000 (21:01 -0400)
commitfe667e87ffca375f35c043e9a6aee0a7897ebd77
tree6b3c34b585d7412cf1c82d0eb33b389ea0fa8e0f
parente742b404f80785d313e21a5df69d8a6756318b88
mmc: sdhci: work around broken dma boundary behavior

Some SD host controllers (noticed on an integrated JMicron SD reader on an
HP Pavilion dv5-1250eo laptop) don't update the dma address register before
signaling a dma interrupt due to a dma boundary. Update the register
manually to the next boundary (by default 512KiB), at which the transfer
stopped.

As long as each transfer is at most 512KiB in size (guaranteed by a BUG_ON
in sdhci_prepare_data()) and the boundary is kept at the default value,
this fix is needed at most once per transfer. Smaller boundaries are taken
care of by counting the transferred bytes.

Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=28462
Signed-off-by: Mikko Vinni <mmvinni@yahoo.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/sdhci.c
drivers/mmc/host/sdhci.h