Message ID | 1566628264-3289-1-git-send-email-wahrenst@gmx.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | mmc: bcm2835: Take SWIOTLB memory size limitation into account | expand |
On Sat, 24 Aug 2019 at 08:31, Stefan Wahren <wahrenst@gmx.net> wrote: > > Make sure the sdhost driver doesn't use requests bigger than SWIOTLB > can handle. > > Signed-off-by: Stefan Wahren <wahrenst@gmx.net> Applies for next, thanks! Kind regards Uffe > --- > drivers/mmc/host/bcm2835.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c > index 7e0d3a4..7ec0d95 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; > -- > 2.7.4 >
diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c index 7e0d3a4..7ec0d95 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;
Make sure the sdhost driver doesn't use requests bigger than SWIOTLB can handle. Signed-off-by: Stefan Wahren <wahrenst@gmx.net> --- drivers/mmc/host/bcm2835.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4