Skip to content

Commit 8c09f61

Browse files
avri-altman-sndkmartinkpetersen
authored andcommitted
scsi: ufs: core: Simplify temperature exception event handling
This commit simplifies the temperature exception event handling by removing the ufshcd_temp_exception_event_handler() function and directly calling ufs_hwmon_notify_event() in ufshcd_exception_event_handler(). The ufshcd_temp_exception_event_handler() function contained a placeholder comment for platform vendors to add additional steps if required. However, since its introduction a few years ago, no vendor has added any additional steps. Therefore, the placeholder function is removed to streamline the code. Signed-off-by: Avri Altman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Bean Huo <[email protected]> Reviewed-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent c9d2782 commit 8c09f61

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

drivers/ufs/core/ufshcd.c

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5976,24 +5976,6 @@ static void ufshcd_bkops_exception_event_handler(struct ufs_hba *hba)
59765976
__func__, err);
59775977
}
59785978

5979-
static void ufshcd_temp_exception_event_handler(struct ufs_hba *hba, u16 status)
5980-
{
5981-
u32 value;
5982-
5983-
if (ufshcd_query_attr_retry(hba, UPIU_QUERY_OPCODE_READ_ATTR,
5984-
QUERY_ATTR_IDN_CASE_ROUGH_TEMP, 0, 0, &value))
5985-
return;
5986-
5987-
dev_info(hba->dev, "exception Tcase %d\n", value - 80);
5988-
5989-
ufs_hwmon_notify_event(hba, status & MASK_EE_URGENT_TEMP);
5990-
5991-
/*
5992-
* A placeholder for the platform vendors to add whatever additional
5993-
* steps required
5994-
*/
5995-
}
5996-
59975979
static int __ufshcd_wb_toggle(struct ufs_hba *hba, bool set, enum flag_idn idn)
59985980
{
59995981
u8 index;
@@ -6214,7 +6196,7 @@ static void ufshcd_exception_event_handler(struct work_struct *work)
62146196
ufshcd_bkops_exception_event_handler(hba);
62156197

62166198
if (status & hba->ee_drv_mask & MASK_EE_URGENT_TEMP)
6217-
ufshcd_temp_exception_event_handler(hba, status);
6199+
ufs_hwmon_notify_event(hba, status & MASK_EE_URGENT_TEMP);
62186200

62196201
ufs_debugfs_exception_event(hba, status);
62206202
}

0 commit comments

Comments
 (0)