Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit b0a4b7b3 authored by Sujit Reddy Thumma's avatar Sujit Reddy Thumma Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarSujit Reddy Thumma <sthumma@codeaurora.org>
parent 7524e3f6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment