Skip to content

Commit

Permalink
mmc: bcm2835-sdhost Observe SWIOTLB memory limit
Browse files Browse the repository at this point in the history
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")
  • Loading branch information
pelwell committed Jan 10, 2025
1 parent d06cb35 commit dfff383
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mmc/host/bcm2835-sdhost.c
Original file line number Diff line number Diff line change
Expand Up @@ -1971,7 +1971,7 @@ int bcm2835_sdhost_add_host(struct platform_device *pdev)
}

mmc->max_segs = 128;
mmc->max_req_size = 524288;
mmc->max_req_size = min_t(size_t, 524288, dma_max_mapping_size(&pdev->dev));
mmc->max_seg_size = mmc->max_req_size;
mmc->max_blk_size = 512;
mmc->max_blk_count = 65535;
Expand Down

0 comments on commit dfff383

Please sign in to comment.