Commit dd2cf44f authored by Bart Van Assche's avatar Bart Van Assche Committed by Martin K. Petersen

scsi: ufs: Remove the UFS_FIX() and END_FIX() macros

Since these two macros reduce code readability, remove them.

Link: https://lore.kernel.org/r/20220419225811.4127248-9-bvanassche@acm.orgTested-by: default avatarBean Huo <beanhuo@micron.com>
Reviewed-by: default avatarAvri Altman <avri.altman@wdc.com>
Reviewed-by: default avatarBean Huo <beanhuo@micron.com>
Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 9d3ab17e
...@@ -45,11 +45,13 @@ ...@@ -45,11 +45,13 @@
ufs_mtk_smc(UFS_MTK_SIP_DEVICE_RESET, high, res) ufs_mtk_smc(UFS_MTK_SIP_DEVICE_RESET, high, res)
static struct ufs_dev_fix ufs_mtk_dev_fixups[] = { static struct ufs_dev_fix ufs_mtk_dev_fixups[] = {
UFS_FIX(UFS_VENDOR_MICRON, UFS_ANY_MODEL, { .wmanufacturerid = UFS_VENDOR_MICRON,
UFS_DEVICE_QUIRK_DELAY_AFTER_LPM), .model = UFS_ANY_MODEL,
UFS_FIX(UFS_VENDOR_SKHYNIX, "H9HQ21AFAMZDAR", .quirk = UFS_DEVICE_QUIRK_DELAY_AFTER_LPM },
UFS_DEVICE_QUIRK_SUPPORT_EXTENDED_FEATURES), { .wmanufacturerid = UFS_VENDOR_SKHYNIX,
END_FIX .model = "H9HQ21AFAMZDAR",
.quirk = UFS_DEVICE_QUIRK_SUPPORT_EXTENDED_FEATURES },
{}
}; };
static const struct of_device_id ufs_mtk_of_match[] = { static const struct of_device_id ufs_mtk_of_match[] = {
......
...@@ -29,15 +29,6 @@ struct ufs_dev_fix { ...@@ -29,15 +29,6 @@ struct ufs_dev_fix {
unsigned int quirk; unsigned int quirk;
}; };
#define END_FIX { }
/* add specific device quirk */
#define UFS_FIX(_vendor, _model, _quirk) { \
.wmanufacturerid = (_vendor),\
.model = (_model), \
.quirk = (_quirk), \
}
/* /*
* Some vendor's UFS device sends back to back NACs for the DL data frames * Some vendor's UFS device sends back to back NACs for the DL data frames
* causing the host controller to raise the DFES error status. Sometimes * causing the host controller to raise the DFES error status. Sometimes
......
...@@ -206,24 +206,31 @@ ufs_get_desired_pm_lvl_for_dev_link_state(enum ufs_dev_pwr_mode dev_state, ...@@ -206,24 +206,31 @@ ufs_get_desired_pm_lvl_for_dev_link_state(enum ufs_dev_pwr_mode dev_state,
static struct ufs_dev_fix ufs_fixups[] = { static struct ufs_dev_fix ufs_fixups[] = {
/* UFS cards deviations table */ /* UFS cards deviations table */
UFS_FIX(UFS_VENDOR_MICRON, UFS_ANY_MODEL, { .wmanufacturerid = UFS_VENDOR_MICRON,
UFS_DEVICE_QUIRK_DELAY_BEFORE_LPM | .model = UFS_ANY_MODEL,
UFS_DEVICE_QUIRK_SWAP_L2P_ENTRY_FOR_HPB_READ), .quirk = UFS_DEVICE_QUIRK_DELAY_BEFORE_LPM |
UFS_FIX(UFS_VENDOR_SAMSUNG, UFS_ANY_MODEL, UFS_DEVICE_QUIRK_SWAP_L2P_ENTRY_FOR_HPB_READ },
UFS_DEVICE_QUIRK_DELAY_BEFORE_LPM | { .wmanufacturerid = UFS_VENDOR_SAMSUNG,
UFS_DEVICE_QUIRK_HOST_PA_TACTIVATE | .model = UFS_ANY_MODEL,
UFS_DEVICE_QUIRK_RECOVERY_FROM_DL_NAC_ERRORS), .quirk = UFS_DEVICE_QUIRK_DELAY_BEFORE_LPM |
UFS_FIX(UFS_VENDOR_SKHYNIX, UFS_ANY_MODEL, UFS_DEVICE_QUIRK_HOST_PA_TACTIVATE |
UFS_DEVICE_QUIRK_HOST_PA_SAVECONFIGTIME), UFS_DEVICE_QUIRK_RECOVERY_FROM_DL_NAC_ERRORS },
UFS_FIX(UFS_VENDOR_SKHYNIX, "hB8aL1" /*H28U62301AMR*/, { .wmanufacturerid = UFS_VENDOR_SKHYNIX,
UFS_DEVICE_QUIRK_HOST_VS_DEBUGSAVECONFIGTIME), .model = UFS_ANY_MODEL,
UFS_FIX(UFS_VENDOR_TOSHIBA, UFS_ANY_MODEL, .quirk = UFS_DEVICE_QUIRK_HOST_PA_SAVECONFIGTIME },
UFS_DEVICE_QUIRK_DELAY_BEFORE_LPM), { .wmanufacturerid = UFS_VENDOR_SKHYNIX,
UFS_FIX(UFS_VENDOR_TOSHIBA, "THGLF2G9C8KBADG", .model = "hB8aL1" /*H28U62301AMR*/,
UFS_DEVICE_QUIRK_PA_TACTIVATE), .quirk = UFS_DEVICE_QUIRK_HOST_VS_DEBUGSAVECONFIGTIME },
UFS_FIX(UFS_VENDOR_TOSHIBA, "THGLF2G9D8KBADG", { .wmanufacturerid = UFS_VENDOR_TOSHIBA,
UFS_DEVICE_QUIRK_PA_TACTIVATE), .model = UFS_ANY_MODEL,
END_FIX .quirk = UFS_DEVICE_QUIRK_DELAY_BEFORE_LPM },
{ .wmanufacturerid = UFS_VENDOR_TOSHIBA,
.model = "THGLF2G9C8KBADG",
.quirk = UFS_DEVICE_QUIRK_PA_TACTIVATE },
{ .wmanufacturerid = UFS_VENDOR_TOSHIBA,
.model = "THGLF2G9D8KBADG",
.quirk = UFS_DEVICE_QUIRK_PA_TACTIVATE },
{}
}; };
static irqreturn_t ufshcd_tmc_handler(struct ufs_hba *hba); static irqreturn_t ufshcd_tmc_handler(struct ufs_hba *hba);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment