scsi: ufs: exynos: Fix DMA alignment for PAGE_SIZE != 4096
authorBart Van Assche <bvanassche@acm.org>
Thu, 12 Jan 2023 23:42:13 +0000 (15:42 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:33:15 +0000 (09:33 +0100)
commit473cc5169994842c2b3f448b117d909dc84c3463
tree452b26881c2fd3bca3223893edb1fec90bb7a9ac
parent243a79c3dfd9d603f5919796125750992976faec
scsi: ufs: exynos: Fix DMA alignment for PAGE_SIZE != 4096

[ Upstream commit 86bd0c4a2a5dc4265884648cb92c681646509692 ]

The Exynos UFS controller only supports scatter/gather list elements that
are aligned on a 4 KiB boundary. Fix DMA alignment in case PAGE_SIZE !=
4096. Rename UFSHCD_QUIRK_ALIGN_SG_WITH_PAGE_SIZE into
UFSHCD_QUIRK_4KB_DMA_ALIGNMENT.

Cc: Kiwoong Kim <kwmad.kim@samsung.com>
Fixes: 2b2bfc8aa519 ("scsi: ufs: Introduce a quirk to allow only page-aligned sg entries")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Tested-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/ufs/core/ufshcd.c
drivers/ufs/host/ufs-exynos.c
include/ufs/ufshcd.h