Prepare for enabling DMA clustering and also for supporting PAGE_SIZE != 4096 by declaring explicitly that the maximum segment size is 4096 bytes for Exynos UFS host controllers. Cc: Kiwoong Kim <kwmad.kim@xxxxxxxxxxx> Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx> --- drivers/ufs/host/ufs-exynos.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/ufs/host/ufs-exynos.c b/drivers/ufs/host/ufs-exynos.c index 3cdac89a28b8..821c000ca6b0 100644 --- a/drivers/ufs/host/ufs-exynos.c +++ b/drivers/ufs/host/ufs-exynos.c @@ -1586,15 +1586,21 @@ static int exynos_ufs_probe(struct platform_device *pdev) const struct ufs_hba_variant_ops *vops = &ufs_hba_exynos_ops; const struct exynos_ufs_drv_data *drv_data = device_get_match_data(dev); + struct ufs_hba *hba; if (drv_data && drv_data->vops) vops = drv_data->vops; err = ufshcd_pltfrm_init(pdev, vops); - if (err) + if (err) { dev_err(dev, "ufshcd_pltfrm_init() failed %d\n", err); + return err; + } + + hba = dev_get_drvdata(dev); + hba->host->max_segment_size = 4096; - return err; + return 0; } static int exynos_ufs_remove(struct platform_device *pdev)