android_kernel_motorola_sm6225/drivers/mmc/host
Linus Walleij 26eed9a5c6 [ARM] 5022/1: Race in ARM MMCI PL18x driver, V2
Updated version of 4446/1. This also drops the suggested comparison
of host_remain for == 0, since that doesn't make sense (still works
for us, too). We have verified that this patch solve race problems
on atleast 2 archs at high frequencies.

(Verbatim copy of old patch text below.)

The patch below fixes a race condition in the ARM MMCI PL18x driver.

If new data arrives in the FIFO while existing data is being read then
we get a second iteration of the loop in mmci_pio_read.

However host->size is not updated until after mmci_pio_read returns,
so we get count = number of new bytes PLUS number of bytes already
copied in the first iteration. This results in a FIFO underrun as
we try and read mode data than is available.

The fix is to compensating for data read on previous iterations
when calculating the amount of data in the FIFO.

Signed-off-by: Linus Walleij <triad@df.lth.se>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-04-28 17:03:34 +01:00
..
at91_mci.c mmc: fix platform driver hotplug/coldplug 2008-04-15 19:35:40 -07:00
au1xmmc.c mmc: fix platform driver hotplug/coldplug 2008-04-15 19:35:40 -07:00
au1xmmc.h mmc: Move host and card drivers to subdirs 2007-05-01 13:04:17 +02:00
imxmmc.c mmc: fix platform driver hotplug/coldplug 2008-04-15 19:35:40 -07:00
imxmmc.h mmc: Move host and card drivers to subdirs 2007-05-01 13:04:17 +02:00
Kconfig mmc: remove sdhci and mmc_spi experimental markers 2008-02-08 09:02:46 +01:00
Makefile mmc: Disabler for Ricoh MMC controller 2007-10-03 18:40:05 +02:00
mmc_spi.c spi: use simplified spi_sync() calling convention 2007-12-05 09:21:19 -08:00
mmci.c [ARM] 5022/1: Race in ARM MMCI PL18x driver, V2 2008-04-28 17:03:34 +01:00
mmci.h mmc: fix sg->page fallout 2007-10-23 20:37:24 +02:00
omap.c MMC: OMAP: Do not busy wait for end of command for ever 2008-04-18 20:05:31 +02:00
pxamci.c mmc: fix platform driver hotplug/coldplug 2008-04-15 19:35:40 -07:00
pxamci.h [ARM] pxa: mmc: add 1st host controller support for pxa3xx 2008-01-26 15:07:53 +00:00
ricoh_mmc.c mmc: extend ricoh_mmc to support Ricoh RL5c476 2008-02-08 09:02:47 +01:00
sdhci.c sdhci: improve no card, no reset quirk 2008-04-18 20:05:31 +02:00
sdhci.h sdhci: allow led to be controlled freely 2008-04-18 20:05:27 +02:00
tifm_sd.c tifm_sd: DATA_CARRY is not boolean in tifm_sd_transfer_data() 2008-03-15 09:24:21 -07:00
wbsd.c mmc: fix platform driver hotplug/coldplug 2008-04-15 19:35:40 -07:00
wbsd.h mmc: update header file paths 2007-07-26 01:53:31 +02:00