Skip to content

Commit fb1f456

Browse files
bvanasschemartinkpetersen
authored andcommitted
scsi: ufs: core: Disable timestamp functionality if not supported
Some Kioxia UFS 4 devices do not support the qTimestamp attribute. Set the UFS_DEVICE_QUIRK_NO_TIMESTAMP_SUPPORT for these devices such that no error messages appear in the kernel log about failures to set the qTimestamp attribute. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: Avri Altman <avri.altman@sandisk.com> Tested-by: Nitin Rawat <quic_nitirawa@quicinc.com> # on SM8650-QRD Reviewed-by: Nitin Rawat <quic_nitirawa@quicinc.com> Reviewed-by: Peter Wang <peter.wang@mediatek.com> Reviewed-by: Manivannan Sadhasivam <mani@kernel.org> Message-ID: <20250909190614.3531435-1-bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent f2d81dd commit fb1f456

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

drivers/ufs/core/ufshcd.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,9 @@ static const struct ufs_dev_quirk ufs_fixups[] = {
316316
{ .wmanufacturerid = UFS_VENDOR_TOSHIBA,
317317
.model = "THGLF2G9D8KBADG",
318318
.quirk = UFS_DEVICE_QUIRK_PA_TACTIVATE },
319+
{ .wmanufacturerid = UFS_VENDOR_TOSHIBA,
320+
.model = "THGJFJT1E45BATP",
321+
.quirk = UFS_DEVICE_QUIRK_NO_TIMESTAMP_SUPPORT },
319322
{}
320323
};
321324

@@ -8778,7 +8781,8 @@ static void ufshcd_set_timestamp_attr(struct ufs_hba *hba)
87788781
struct ufs_dev_info *dev_info = &hba->dev_info;
87798782
struct utp_upiu_query_v4_0 *upiu_data;
87808783

8781-
if (dev_info->wspecversion < 0x400)
8784+
if (dev_info->wspecversion < 0x400 ||
8785+
hba->dev_quirks & UFS_DEVICE_QUIRK_NO_TIMESTAMP_SUPPORT)
87828786
return;
87838787

87848788
ufshcd_dev_man_lock(hba);

include/ufs/ufs_quirks.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,4 +113,7 @@ struct ufs_dev_quirk {
113113
*/
114114
#define UFS_DEVICE_QUIRK_PA_HIBER8TIME (1 << 12)
115115

116+
/* Some UFS 4 devices do not support the qTimestamp attribute */
117+
#define UFS_DEVICE_QUIRK_NO_TIMESTAMP_SUPPORT (1 << 13)
118+
116119
#endif /* UFS_QUIRKS_H_ */

0 commit comments

Comments
 (0)