diff options
author | Markos Chandras <markos.chandras@imgtec.com> | 2013-03-12 11:53:13 +0100 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2013-03-22 17:53:49 +0100 |
commit | cfbeb59c7a818a2ec0008914ce479fe5d6f5978b (patch) | |
tree | 4da01e29b0597b53a573e1e403cbb9dfdcaabb25 /drivers/mmc/host/android-goldfish.c | |
parent | mmc: dw_mmc: Avoid adding the number of transmitted bytes twice (diff) | |
download | linux-cfbeb59c7a818a2ec0008914ce479fe5d6f5978b.tar.xz linux-cfbeb59c7a818a2ec0008914ce479fe5d6f5978b.zip |
mmc: dw_mmc: Handle unaligned data submission correctly
Commit f9c2a0dc42a6938ff2a80e55ca2bbd1d5581c72e
"mmc: dw_mmc: Fix PIO mode with support of highmem" introduced
a regression since v3.2 making the mmc_test hang on test #13
with a "Data starvation by host timeout" interrupt.
This is because, sg_mapping_iter is used to iterate through the
data which spans on multiple pages. The problem is detected on
unaligned data submission where the code previously checked for
!(sg_next(host->sg)) which is true because we only have a single
scatter/gather list which then expands to multiple pages.
Therefore, the driver incorrectly assumed that this was the last
list item and submitted unaligned data to the mmc device. This
overflowed the FIFO on the device before all the data were written
to it. The code was fixed to only submit unaligned data when we are
handling the last sg_miter item by checking whether we reached
the desired data length or not.
The patch was tested against mmc_test and all the tests passed.
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Acked-by: Seungwon Jeon <tgih.jun@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host/android-goldfish.c')
0 files changed, 0 insertions, 0 deletions