diff options
author | jongmin jeong <[email protected]> | 2021-10-18 21:42:02 +0900 |
---|---|---|
committer | Martin K. Petersen <[email protected]> | 2021-10-27 23:10:10 -0400 |
commit | a22bcfdbf10b4182e94ae98a641efa676170feaf (patch) | |
tree | 19464bc8c3aa54d9e361e81ba4c88a94c7899b12 | |
parent | 3a71f0f7a51259b3cb95d79cac1e19dcc5e89ce9 (diff) |
scsi: ufs: Add quirk to handle broken UIC command
Samsung ExynosAuto v9 SoC has two types of host controller interface to
support the virtualization of UFS Device. One is the physical host (PH)
that is the same as conventional UFSHCI, and the other is the virtual host
(VH) that supports data transfer function only.
In this configuration the virtual host does not support UIC commands. Add a
quirk to return 0 when the UIC command send function is called.
Link: https://lore.kernel.org/r/[email protected]
Cc: Alim Akhtar <[email protected]>
Cc: James E.J. Bottomley <[email protected]>
Cc: Martin K. Petersen <[email protected]>
Cc: Bart Van Assche <[email protected]>
Reviewed-by: Alim Akhtar <[email protected]>
Signed-off-by: jongmin jeong <[email protected]>
Signed-off-by: Chanho Park <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
-rw-r--r-- | drivers/scsi/ufs/ufshcd.c | 3 | ||||
-rw-r--r-- | drivers/scsi/ufs/ufshcd.h | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 04cb67995750..dc7ce9eef0c7 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -2330,6 +2330,9 @@ int ufshcd_send_uic_cmd(struct ufs_hba *hba, struct uic_command *uic_cmd) int ret; unsigned long flags; + if (hba->quirks & UFSHCD_QUIRK_BROKEN_UIC_CMD) + return 0; + ufshcd_hold(hba, false); mutex_lock(&hba->uic_cmd_mutex); ufshcd_add_delay_before_dme_cmd(hba); diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h index 3f5dc6732fe1..e67181a013e3 100644 --- a/drivers/scsi/ufs/ufshcd.h +++ b/drivers/scsi/ufs/ufshcd.h @@ -589,6 +589,12 @@ enum ufshcd_quirks { * This quirk allows only sg entries aligned with page size. */ UFSHCD_QUIRK_ALIGN_SG_WITH_PAGE_SIZE = 1 << 14, + + /* + * This quirk needs to be enabled if the host controller does not + * support UIC command + */ + UFSHCD_QUIRK_BROKEN_UIC_CMD = 1 << 15, }; enum ufshcd_caps { |