Commit d4dd9bcc authored by Stefan Wahren's avatar Stefan Wahren Committed by Ulf Hansson

mmc: bcm2835: Take SWIOTLB memory size limitation into account

Make sure the sdhost driver doesn't use requests bigger than SWIOTLB
can handle.
Signed-off-by: default avatarStefan Wahren <wahrenst@gmx.net>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent bb7b8ec6
...@@ -1314,7 +1314,7 @@ static int bcm2835_add_host(struct bcm2835_host *host) ...@@ -1314,7 +1314,7 @@ static int bcm2835_add_host(struct bcm2835_host *host)
} }
mmc->max_segs = 128; mmc->max_segs = 128;
mmc->max_req_size = 524288; mmc->max_req_size = min_t(size_t, 524288, dma_max_mapping_size(dev));
mmc->max_seg_size = mmc->max_req_size; mmc->max_seg_size = mmc->max_req_size;
mmc->max_blk_size = 1024; mmc->max_blk_size = 1024;
mmc->max_blk_count = 65535; mmc->max_blk_count = 65535;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment