Skip to content

Commit 1635e40

Browse files
aurel32storulf
authored andcommitted
Revert "mmc: dw_mmc: Fix IDMAC operation with pages bigger than 4K"
The commit 8396c79 ("mmc: dw_mmc: Fix IDMAC operation with pages bigger than 4K") increased the max_req_size, even for 4K pages, causing various issues: - Panic booting the kernel/rootfs from an SD card on Rockchip RK3566 - Panic booting the kernel/rootfs from an SD card on StarFive JH7100 - "swiotlb buffer is full" and data corruption on StarFive JH7110 At this stage no fix have been found, so it's probably better to just revert the change. This reverts commit 8396c79. Cc: [email protected] Cc: Sam Protsenko <[email protected]> Fixes: 8396c79 ("mmc: dw_mmc: Fix IDMAC operation with pages bigger than 4K") Closes: https://lore.kernel.org/linux-mmc/[email protected]/ Closes: https://lore.kernel.org/linux-mmc/CAC8uq=Ppnmv98mpa1CrWLawWoPnu5abtU69v-=G-P7ysATQ2Pw@mail.gmail.com/ Signed-off-by: Aurelien Jarno <[email protected]> Message-ID: <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
1 parent 85b580a commit 1635e40

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/mmc/host/dw_mmc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2957,8 +2957,8 @@ static int dw_mci_init_slot(struct dw_mci *host)
29572957
if (host->use_dma == TRANS_MODE_IDMAC) {
29582958
mmc->max_segs = host->ring_size;
29592959
mmc->max_blk_size = 65535;
2960-
mmc->max_req_size = DW_MCI_DESC_DATA_LENGTH * host->ring_size;
2961-
mmc->max_seg_size = mmc->max_req_size;
2960+
mmc->max_seg_size = 0x1000;
2961+
mmc->max_req_size = mmc->max_seg_size * host->ring_size;
29622962
mmc->max_blk_count = mmc->max_req_size / 512;
29632963
} else if (host->use_dma == TRANS_MODE_EDMAC) {
29642964
mmc->max_segs = 64;

0 commit comments

Comments
 (0)