diff options
author | Can Guo <cang@codeaurora.org> | 2020-08-09 05:15:50 -0700 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2020-08-17 20:54:53 -0400 |
commit | 3f8af6044713fab0aeb884e1be6bcc2cb276725e (patch) | |
tree | 69513f4bea55c92ba3acc8fa6e7a963c95c87a2e /drivers/scsi/ufs/ufshcd.h | |
parent | 423cc66b5152a309e99a3693d856157a5e4a8d39 (diff) | |
download | lwn-3f8af6044713fab0aeb884e1be6bcc2cb276725e.tar.gz lwn-3f8af6044713fab0aeb884e1be6bcc2cb276725e.zip |
scsi: ufs: Add some debug information to ufshcd_print_host_state()
Information about the last interrupt status and timestamp is helpful when
debugging system stability issues (IRQ starvation, for instance). Add this
information to ufshcd_print_host_state() output.
In addition, UFS device information such as model name and firmware version
also comes in handy during debugging. This is printed as well.
Link: https://lore.kernel.org/r/1596975355-39813-5-git-send-email-cang@codeaurora.org
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Reviewed-by: Hongwu Su <hongwus@codeaurora.org>
Reviewed-by: Asutosh Das <asutoshd@codeaurora.org>
Reviewed-by: Stanley Chu <stanley.chu@mediatek.com>
Reviewed-by: Bean Huo <beanhuo@micron.com>
Signed-off-by: Can Guo <cang@codeaurora.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/ufs/ufshcd.h')
-rw-r--r-- | drivers/scsi/ufs/ufshcd.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h index b2ef18f1b746..b7f54af38b68 100644 --- a/drivers/scsi/ufs/ufshcd.h +++ b/drivers/scsi/ufs/ufshcd.h @@ -409,6 +409,8 @@ struct ufs_err_reg_hist { /** * struct ufs_stats - keeps usage/err statistics + * @last_intr_status: record the last interrupt status. + * @last_intr_ts: record the last interrupt timestamp. * @hibern8_exit_cnt: Counter to keep track of number of exits, * reset this after link-startup. * @last_hibern8_exit_tstamp: Set time after the hibern8 exit. @@ -428,6 +430,9 @@ struct ufs_err_reg_hist { * @tsk_abort: tracks task abort events */ struct ufs_stats { + u32 last_intr_status; + ktime_t last_intr_ts; + u32 hibern8_exit_cnt; ktime_t last_hibern8_exit_tstamp; |