mmc: msm_sdcc: Use sg_miter API for PIO

Use sgl mapping iterator to process sgls in PIO mode instead
of pointer arithmetic. This prevents possible page faults
caused by accessing kmapped memory when sge buffer is larger
than PAGE_SIZE or straddles several pages. The buffer returned
by kmap_atomic() is only one PAGE_SIZE large, and an sge buffer
larger than a PAGE_SIZE must be processed in PAGE_SIZEd chunks.

Change-Id: I59f130ca2963b5327a4ce7d3016cc558dcb87218
Signed-off-by: Oluwafemi Adeyemi <aadeyemi@codeaurora.org>
2 files changed