scsi: ufs: core: Add support for qTimestamp attribute
authorArthur Simchaev <Arthur.Simchaev@wdc.com>
Mon, 26 Jun 2023 10:33:19 +0000 (13:33 +0300)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 6 Jul 2023 01:44:07 +0000 (21:44 -0400)
commit24befa92ed47ed2af25868412a1275602ca8f4ea
tree89479122149e8972266df62047e9856412a33f9b
parent47699a2b63caaa0de4841d4402627c2fdf3452a6
scsi: ufs: core: Add support for qTimestamp attribute

The new qTimestamp attribute was added to UFS 4.0 spec, in order to
synchronize timestamp between device logs and the host. The spec recommends
to send this attribute upon device power-on Reset/HW reset or when
switching to Active state (using SSU command). Due to this attribute, the
attribute's max value was extended to 8 bytes. As a result, the new
definition of struct utp_upiu_query_v4_0 was added.

Signed-off-by: Arthur Simchaev <Arthur.Simchaev@wdc.com>
-----------------
Changes to v2:
- Adressed Bart's comments
- Add missed response variable to ufshcd_set_timestamp_attr

Link: https://lore.kernel.org/r/20230626103320.8737-1-arthur.simchaev@wdc.com
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/ufs/core/ufshcd.c
include/uapi/scsi/scsi_bsg_ufs.h
include/ufs/ufs.h