We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 338c41c commit 9dfbe9fCopy full SHA for 9dfbe9f
drivers/mmc/host/bcm2835-mmc.c
@@ -38,6 +38,7 @@
38
#include <linux/dmaengine.h>
39
#include <linux/dma-mapping.h>
40
#include <linux/of_dma.h>
41
+#include <linux/swiotlb.h>
42
43
#include "sdhci.h"
44
@@ -1374,7 +1375,10 @@ static int bcm2835_mmc_add_host(struct bcm2835_host *host)
1374
1375
}
1376
#endif
1377
mmc->max_segs = 128;
- mmc->max_req_size = 524288;
1378
+ if (swiotlb_max_segment())
1379
+ mmc->max_req_size = (1 << IO_TLB_SHIFT) * IO_TLB_SEGSIZE;
1380
+ else
1381
+ mmc->max_req_size = 524288;
1382
mmc->max_seg_size = mmc->max_req_size;
1383
mmc->max_blk_size = 512;
1384
mmc->max_blk_count = 65535;
0 commit comments