
Adds latest 6.6 patches from the Raspberry Pi repository. These patches were generated from: https://github.com/raspberrypi/linux/commits/rpi-6.6.y/ With the following command: git format-patch -N v6.6.83..HEAD (HEAD -> 08d4e8f52256bd422d8a1f876411603f627d0a82) Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> (cherry picked from commit 251f76c1c67d62c585d799c38dab31e1385d2ad5)
30 lines
980 B
Diff
30 lines
980 B
Diff
From dfff38316c1284c30c68d02cc424bad0562cf253 Mon Sep 17 00:00:00 2001
|
|
From: Phil Elwell <phil@raspberrypi.com>
|
|
Date: Fri, 10 Jan 2025 16:33:13 +0000
|
|
Subject: [PATCH] mmc: bcm2835-sdhost Observe SWIOTLB memory limit
|
|
|
|
Make sure the sdhost driver doesn't use requests bigger than SWIOTLB
|
|
can handle.
|
|
|
|
Copied from [1].
|
|
|
|
Link: https://github.com/raspberrypi/linux/issues/6589
|
|
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
|
[1] d4dd9bccf485 ("mmc: bcm2835: Take SWIOTLB memory size limitation
|
|
into account")
|
|
---
|
|
drivers/mmc/host/bcm2835-sdhost.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
--- a/drivers/mmc/host/bcm2835-sdhost.c
|
|
+++ b/drivers/mmc/host/bcm2835-sdhost.c
|
|
@@ -1971,7 +1971,7 @@ int bcm2835_sdhost_add_host(struct platf
|
|
}
|
|
|
|
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;
|