mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
BACKPORT: 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/20211018124216.153072-2-chanho61.park@samsung.com Cc: Alim Akhtar <alim.akhtar@samsung.com> Cc: James E.J. Bottomley <jejb@linux.ibm.com> Cc: Martin K. Petersen <martin.petersen@oracle.com> Cc: Bart Van Assche <bvanassche@acm.org> Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com> Signed-off-by: jongmin jeong <jjmin.jeong@samsung.com> Signed-off-by: Chanho Park <chanho61.park@samsung.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Bug: 206186055 (cherry picked from commita22bcfdbf1) [Chanho: Resolved cherry-pick conflict in drivers/scsi/ufs/ufshcd.h due to below ANDROID keyslot patch.74e7fc0492("ANDROID: scsi: ufs: split up UFSHCD_QUIRK_NO_KEYSLOTS") No code change from original patch] Change-Id: Iff59b08ebf1494542c548678772cfc0230c2f91e
This commit is contained in:
committed by
Bart Van Assche
parent
1694ef383e
commit
7f1f1f7902
@@ -2329,6 +2329,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);
|
||||
|
||||
@@ -589,6 +589,12 @@ enum ufshcd_quirks {
|
||||
*/
|
||||
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,
|
||||
|
||||
/*
|
||||
* This quirk needs to be enabled if the host controller supports inline
|
||||
* encryption, but it needs to initialize the crypto capabilities in a
|
||||
|
||||
Reference in New Issue
Block a user