diff options
author | Stefan Wahren <wahrenst@gmx.net> | 2019-08-24 09:31:04 +0300 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2019-09-11 16:58:39 +0300 |
commit | d4dd9bccf4854cc6ed853b2b73d5afd8707cff20 (patch) | |
tree | 88f082dbdf3e10909364a0a94893555f72fe6c54 /drivers/mmc | |
parent | bb7b8ec62dfb9b255027c3a54d01f12fc3bd1d2c (diff) | |
download | linux-d4dd9bccf4854cc6ed853b2b73d5afd8707cff20.tar.xz |
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>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/bcm2835.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c index e1b7757c48fe..7c30d79a9fdd 100644 --- a/drivers/mmc/host/bcm2835.c +++ b/drivers/mmc/host/bcm2835.c @@ -1314,7 +1314,7 @@ static int bcm2835_add_host(struct bcm2835_host *host) } 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_blk_size = 1024; mmc->max_blk_count = 65535; |