@@ -1194,9 +1194,10 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host)
* Since swiotlb has memory size limitation, this will calculate
* the maximum size locally (because we don't have any APIs for it now)
* and check the current max_req_size. And then, this will update
- * the max_req_size if needed as a workaround.
+ * the max_req_size if needed as a workaround. However, if the driver
+ * runs on IOMMU, this workaround isn't needed.
*/
- if (swiotlb_max_segment()) {
+ if (swiotlb_max_segment() && !device_iommu_mapped(&pdev->dev)) {
unsigned int max_size = (1 << IO_TLB_SHIFT) * IO_TLB_SEGSIZE;
if (mmc->max_req_size > max_size)