summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ufs/ufshcd.c
diff options
context:
space:
mode:
authorStanley Chu <stanley.chu@mediatek.com>2020-05-08 16:01:09 +0800
committerMartin K. Petersen <martin.petersen@oracle.com>2020-05-11 22:48:42 -0400
commitc28c00ba4f060949c2f461f08a4aa10024a40672 (patch)
tree5feb954e6b9260b97f8b26ef7c1be09cdb1fd821 /drivers/scsi/ufs/ufshcd.c
parent817d7e140283f4afc766569c670997df79a7c9ee (diff)
scsi: ufs: Introduce fixup_dev_quirks vops
Some UFS deivces may have required device quirks or have non-standard features which are enabled only on specified UFS hosts or for special customers. To not "pollute" common device quirk list, i.e. ufs_fixups table, for those devices mentioned above, introduce "fixup_dev_quirks" vops to allow vendors to fix or modify device quirks accordingly. Link: https://lore.kernel.org/r/20200508080115.24233-3-stanley.chu@mediatek.com Reviewed-by: Avri Altman <avri.altman@wdc.com> Reviewed-by: Asutosh Das <asutoshd@codeaurora.org> Signed-off-by: Stanley Chu <stanley.chu@mediatek.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/ufs/ufshcd.c')
-rw-r--r--drivers/scsi/ufs/ufshcd.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index a802c5f5ec7c..8d86d9a6a622 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -6838,7 +6838,7 @@ wb_disabled:
hba->caps &= ~UFSHCD_CAP_WB_EN;
}
-static void ufs_fixup_device_setup(struct ufs_hba *hba)
+static void ufshcd_fixup_dev_quirks(struct ufs_hba *hba)
{
struct ufs_dev_fix *f;
struct ufs_dev_info *dev_info = &hba->dev_info;
@@ -6853,6 +6853,15 @@ static void ufs_fixup_device_setup(struct ufs_hba *hba)
}
}
+static void ufs_fixup_device_setup(struct ufs_hba *hba)
+{
+ /* fix by general quirk table */
+ ufshcd_fixup_dev_quirks(hba);
+
+ /* allow vendors to fix quirks */
+ ufshcd_vops_fixup_dev_quirks(hba);
+}
+
static int ufs_get_device_desc(struct ufs_hba *hba)
{
int err;