From: Thierry Reding <tred...@nvidia.com>

Do not overwrite the MMC host's configured maximum segment size for DMA
transfers. For devices behind an IOMMU, the queue's maximum segment size
may be larger than that of the MMC host, but that doesn't mean that the
MMC host actually supports it.

Signed-off-by: Thierry Reding <tred...@nvidia.com>
---
 drivers/mmc/core/queue.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/mmc/core/queue.c b/drivers/mmc/core/queue.c
index 1e29b305767e..987b01f4cfb3 100644
--- a/drivers/mmc/core/queue.c
+++ b/drivers/mmc/core/queue.c
@@ -389,8 +389,6 @@ static void mmc_setup_queue(struct mmc_queue *mq, struct 
mmc_card *card)
                blk_queue_max_segment_size(mq->queue,
                        round_down(host->max_seg_size, block_size));
 
-       dma_set_max_seg_size(mmc_dev(host), queue_max_segment_size(mq->queue));
-
        INIT_WORK(&mq->recovery_work, mmc_mq_recovery_handler);
        INIT_WORK(&mq->complete_work, mmc_blk_mq_complete_work);
 
-- 
2.23.0

Reply via email to