mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 21:24:08 +08:00
scsi: ufs: Export ufs_fixup_device_setup() function
Export ufs_fixup_device_setup() to allow vendors to re-use it for fixing device quriks on specified UFS hosts. Link: https://lore.kernel.org/r/20200508080115.24233-4-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>
This commit is contained in:
parent
c28c00ba4f
commit
8db269a510
@ -6838,12 +6838,15 @@ wb_disabled:
|
||||
hba->caps &= ~UFSHCD_CAP_WB_EN;
|
||||
}
|
||||
|
||||
static void ufshcd_fixup_dev_quirks(struct ufs_hba *hba)
|
||||
void ufshcd_fixup_dev_quirks(struct ufs_hba *hba, struct ufs_dev_fix *fixups)
|
||||
{
|
||||
struct ufs_dev_fix *f;
|
||||
struct ufs_dev_info *dev_info = &hba->dev_info;
|
||||
|
||||
for (f = ufs_fixups; f->quirk; f++) {
|
||||
if (!fixups)
|
||||
return;
|
||||
|
||||
for (f = fixups; f->quirk; f++) {
|
||||
if ((f->wmanufacturerid == dev_info->wmanufacturerid ||
|
||||
f->wmanufacturerid == UFS_ANY_VENDOR) &&
|
||||
((dev_info->model &&
|
||||
@ -6852,11 +6855,12 @@ static void ufshcd_fixup_dev_quirks(struct ufs_hba *hba)
|
||||
hba->dev_quirks |= f->quirk;
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ufshcd_fixup_dev_quirks);
|
||||
|
||||
static void ufs_fixup_device_setup(struct ufs_hba *hba)
|
||||
{
|
||||
/* fix by general quirk table */
|
||||
ufshcd_fixup_dev_quirks(hba);
|
||||
ufshcd_fixup_dev_quirks(hba, ufs_fixups);
|
||||
|
||||
/* allow vendors to fix quirks */
|
||||
ufshcd_vops_fixup_dev_quirks(hba);
|
||||
|
@ -952,6 +952,7 @@ int ufshcd_query_flag(struct ufs_hba *hba, enum query_opcode opcode,
|
||||
|
||||
void ufshcd_auto_hibern8_enable(struct ufs_hba *hba);
|
||||
void ufshcd_auto_hibern8_update(struct ufs_hba *hba, u32 ahit);
|
||||
void ufshcd_fixup_dev_quirks(struct ufs_hba *hba, struct ufs_dev_fix *fixups);
|
||||
#define SD_ASCII_STD true
|
||||
#define SD_RAW false
|
||||
int ufshcd_read_string_desc(struct ufs_hba *hba, u8 desc_index,
|
||||
|
Loading…
Reference in New Issue
Block a user