RE: [PATCH 1/2] scsi: ufs: Add an enum for ufs_trace to check ufs cmd error

Avri Altman
2025-04-17T04:59:08Z

> There is no trace when a ufs uic cmd error occurs.
> So, add "UFS_CMD_ERR" enumeration to ufs_trace_str_t.
>
> Signed-off-by: DooHyun Hwang <dh0421.hwang@samsung.com>
> ---
> drivers/ufs/core/ufs_trace.h | 1 +
> include/ufs/ufs.h | 2 +-
> 2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/ufs/core/ufs_trace.h b/drivers/ufs/core/ufs_trace.h index
> caa32e23ffa5..43830a092637 100644
> --- a/drivers/ufs/core/ufs_trace.h
> +++ b/drivers/ufs/core/ufs_trace.h
> @@ -41,6 +41,7 @@
> #define UFS_CMD_TRACE_STRINGS \
> EM(UFS_CMD_SEND, "send_req") \
> EM(UFS_CMD_COMP, "complete_rsp") \
> + EM(UFS_CMD_ERR, "req_complete_err") \
> EM(UFS_DEV_COMP, "dev_complete") \
> EM(UFS_QUERY_SEND, "query_send") \
> EM(UFS_QUERY_COMP, "query_complete") \
> diff --git a/include/ufs/ufs.h b/include/ufs/ufs.h index
> c0c59a8f7256..7f2d418bdd86 100644
> --- a/include/ufs/ufs.h
> +++ b/include/ufs/ufs.h
> @@ -631,7 +631,7 @@ struct ufs_dev_info {
> * This enum is used in string mapping in ufs_trace.h.
> */
> enum ufs_trace_str_t {
> - UFS_CMD_SEND, UFS_CMD_COMP, UFS_DEV_COMP,
> + UFS_CMD_SEND, UFS_CMD_COMP, UFS_CMD_ERR, UFS_DEV_COMP,
> UFS_QUERY_SEND, UFS_QUERY_COMP, UFS_QUERY_ERR,
> UFS_TM_SEND, UFS_TM_COMP, UFS_TM_ERR };
It seems strange to me that scsi & uic commands are designated by the same enum.
Has it been considered to add UFS_UIC_SEND, UFS_UIC_COMP, UFS_UIC_ERR to enum ufs_trace_str_t ?
Also looks like UFS_DEV_COMP is unused ?

Thanks,
Avri

> --
> 2.48.1