Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] mmc: bcm2835: Take SWIOTLB memory size limitation into account
@ 2019-08-24  6:31 Stefan Wahren
  2019-08-27 13:49 ` Ulf Hansson
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Wahren @ 2019-08-24  6:31 UTC (permalink / raw)
  To: Ulf Hansson, Eric Anholt, Florian Fainelli, Ray Jui,
	Scott Branden, Lukas Wunner
  Cc: linux-mmc, Stefan Wahren, linux-arm-kernel

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(-)

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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] mmc: bcm2835: Take SWIOTLB memory size limitation into account
  2019-08-24  6:31 [PATCH] mmc: bcm2835: Take SWIOTLB memory size limitation into account Stefan Wahren
@ 2019-08-27 13:49 ` Ulf Hansson
  0 siblings, 0 replies; 2+ messages in thread
From: Ulf Hansson @ 2019-08-27 13:49 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: Florian Fainelli, Scott Branden, Ray Jui, linux-mmc, Eric Anholt,
	Lukas Wunner, Linux ARM

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
>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-24  6:31 [PATCH] mmc: bcm2835: Take SWIOTLB memory size limitation into account Stefan Wahren
2019-08-27 13:49 ` Ulf Hansson

Linux-ARM-Kernel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-arm-kernel/0 linux-arm-kernel/git/0.git
	git clone --mirror https://lore.kernel.org/linux-arm-kernel/1 linux-arm-kernel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-arm-kernel linux-arm-kernel/ https://lore.kernel.org/linux-arm-kernel \
		linux-arm-kernel@lists.infradead.org infradead-linux-arm-kernel@archiver.kernel.org
	public-inbox-index linux-arm-kernel


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-arm-kernel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox