brcm2708: update linux 4.4 patches to latest version
[openwrt/svn-archive/archive.git] / target / linux / brcm2708 / patches-4.4 / 0152-bcm2835-sdhost-Restore-ATOMIC-flag-to-PIO-sg-mapping.patch
1 From f395ff998f2bde846499b1a0ef84519989dc2d4e Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Mon, 15 Feb 2016 10:00:27 +0000
4 Subject: [PATCH 152/170] bcm2835-sdhost: Restore ATOMIC flag to PIO sg mapping
5
6 Allocation problems have been seen in a wireless driver, and
7 this is the only change which might have been responsible.
8 ---
9 drivers/mmc/host/bcm2835-sdhost.c | 7 +++----
10 1 file changed, 3 insertions(+), 4 deletions(-)
11
12 --- a/drivers/mmc/host/bcm2835-sdhost.c
13 +++ b/drivers/mmc/host/bcm2835-sdhost.c
14 @@ -874,15 +874,14 @@ static void bcm2835_sdhost_prepare_data(
15 host->flush_fifo = 0;
16 host->data->bytes_xfered = 0;
17
18 -
19 if (!host->dma_desc) {
20 /* Use PIO */
21 - int flags;
22 + int flags = SG_MITER_ATOMIC;
23
24 if (data->flags & MMC_DATA_READ)
25 - flags = SG_MITER_TO_SG;
26 + flags |= SG_MITER_TO_SG;
27 else
28 - flags = SG_MITER_FROM_SG;
29 + flags |= SG_MITER_FROM_SG;
30 sg_miter_start(&host->sg_miter, data->sg, data->sg_len, flags);
31 host->blocks = data->blocks;
32 }