mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
FROMGIT: scsi: ufs: exynos: Fix the maximum segment size
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. Add this code in
exynos_ufs_hce_enable_notify() such that it happens after scsi_host_alloc()
and before __scsi_init_queue() is called by the LUN scanning code.
Cc: Alim Akhtar <alim.akhtar@samsung.com>
Cc: Kiwoong Kim <kwmad.kim@samsung.com>
Change-Id: I60c24ba2f1b6610df2de775021b94543d890d640
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>
Bug: 267974767
(cherry picked from commit 9a80bc5deb git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next)
Signed-off-by: Bart Van Assche <bvanassche@google.com>
This commit is contained in:
committed by
Todd Kjos
parent
f327d54c2f
commit
edb93849ed
@@ -1300,6 +1300,14 @@ static int exynos_ufs_hce_enable_notify(struct ufs_hba *hba,
|
||||
|
||||
switch (status) {
|
||||
case PRE_CHANGE:
|
||||
/*
|
||||
* The maximum segment size must be set after scsi_host_alloc()
|
||||
* has been called and before LUN scanning starts
|
||||
* (ufshcd_async_scan()). Note: this callback may also be called
|
||||
* from other functions than ufshcd_init().
|
||||
*/
|
||||
hba->host->max_segment_size = 4096;
|
||||
|
||||
if (ufs->drv_data->pre_hce_enable) {
|
||||
ret = ufs->drv_data->pre_hce_enable(ufs);
|
||||
if (ret)
|
||||
|
||||
Reference in New Issue
Block a user