Skip to content

Commit dfff383

Browse files
committed
mmc: bcm2835-sdhost Observe SWIOTLB memory limit
Make sure the sdhost driver doesn't use requests bigger than SWIOTLB can handle. Copied from [1]. Link: #6589 Signed-off-by: Phil Elwell <[email protected]> [1] d4dd9bc ("mmc: bcm2835: Take SWIOTLB memory size limitation into account")
1 parent d06cb35 commit dfff383

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mmc/host/bcm2835-sdhost.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1971,7 +1971,7 @@ int bcm2835_sdhost_add_host(struct platform_device *pdev)
19711971
}
19721972

19731973
mmc->max_segs = 128;
1974-
mmc->max_req_size = 524288;
1974+
mmc->max_req_size = min_t(size_t, 524288, dma_max_mapping_size(&pdev->dev));
19751975
mmc->max_seg_size = mmc->max_req_size;
19761976
mmc->max_blk_size = 512;
19771977
mmc->max_blk_count = 65535;

0 commit comments

Comments
 (0)