Skip to content

Commit d4dd9bc

Browse files
lategoodbyestorulf
authored andcommitted
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: Stefan Wahren <wahrenst@gmx.net> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent bb7b8ec commit d4dd9bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mmc/host/bcm2835.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1314,7 +1314,7 @@ static int bcm2835_add_host(struct bcm2835_host *host)
13141314
}
13151315

13161316
mmc->max_segs = 128;
1317-
mmc->max_req_size = 524288;
1317+
mmc->max_req_size = min_t(size_t, 524288, dma_max_mapping_size(dev));
13181318
mmc->max_seg_size = mmc->max_req_size;
13191319
mmc->max_blk_size = 1024;
13201320
mmc->max_blk_count = 65535;

0 commit comments

Comments
 (0)