RE: [PATCH v5 4/8] scsi: ufs-mediatek: add fixup_dev_quirks vops
From: Avri Altman
Date: Mon May 04 2020 - 06:55:52 EST
> @@ -555,10 +561,8 @@ static int ufs_mtk_apply_dev_quirks(struct ufs_hba
> *hba)
> struct ufs_dev_info *dev_info = &hba->dev_info;
> u16 mid = dev_info->wmanufacturerid;
>
> - if (mid == UFS_VENDOR_SAMSUNG) {
> - hba->dev_quirks &= ~UFS_DEVICE_QUIRK_HOST_PA_TACTIVATE;
> + if (mid == UFS_VENDOR_SAMSUNG)
> ufshcd_dme_set(hba, UIC_ARG_MIB(PA_TACTIVATE), 6);
> - }
>
> /*
> * Decide waiting time before gating reference clock and
> @@ -575,6 +579,17 @@ static int ufs_mtk_apply_dev_quirks(struct ufs_hba
> *hba)
> return 0;
> }
>
> +void ufs_mtk_fixup_dev_quirks(struct ufs_hba *hba)
> +{
> + struct ufs_dev_info *dev_info = &hba->dev_info;
> + u16 mid = dev_info->wmanufacturerid;
> +
> + ufshcd_fixup_device_setup(hba, ufs_mtk_dev_fixups);
> +
> + if (mid == UFS_VENDOR_SAMSUNG)
> + hba->dev_quirks &= ~UFS_DEVICE_QUIRK_HOST_PA_TACTIVATE;
Why move it? It is a unipro/hci param.