mtd: msm_qpic_nand: Fix nand page corruption with vmalloc'ed memory
A buffer allocated with vmalloc() cannot be used directly with
DMA, as the virtually contiguous pages may not be physically
contiguous. If the allocated buffer is unaligned to the page
boundary, it is possible that few bytes may be read/written
from/to a memory page that may not be present in the physically
contiguous domain of vmalloc'ed memory. Thus, incorrectly
programming DMA addresses into controller lead to nand page
or buffer corruptions.
Fix this by using a bounce buffer to map unaligned data to
physically contiguous pages.
Change-Id: If8b0d560567bd21190a43481d6705eca25cbd5b5
Signed-off-by:
Sujit Reddy Thumma <sthumma@codeaurora.org>
Loading
Please register or sign in to comment