bcm2835-sdhost: Allow for sg entries that cross pages
authorPhil Elwell <phil@raspberrypi.org>
Wed, 13 Mar 2019 14:19:11 +0000 (14:19 +0000)
committerpopcornmix <popcornmix@gmail.com>
Mon, 13 May 2019 23:08:23 +0000 (00:08 +0100)
commit3e35b1bac12eea970308788aacf2c4db2e8414ea
treecb6635eec991924b41489166c4b38a37654e6ac2
parent0382a87f667ccb5f3565bc9b220273f300979f72
bcm2835-sdhost: Allow for sg entries that cross pages

The dma_complete handling code calculates a virtual address for a page
then adds an offset, but if the offset is more than a page and HIGHMEM
is in use then the summed address could be in an unmapped (or just
incorrect) page.

The upstream SDHOST driver allows for this possibility - copy the code
that does so.

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
drivers/mmc/host/bcm2835-sdhost.c