2021-01-05 20:05:34

by Bean Huo

[permalink] [raw]
Subject: [PATCH v4 0/6] Several changes for the UPIU trace

From: Bean Huo <[email protected]>

Changelog:

V3--v4:
1. Rebase patch onto 5.12/scsi-queue
2. Incorporate Avri's suggestion in patch 2/6

V2--V3:
1. Fix a typo in patch 1/6 (Reported-by: Joe Perches <[email protected]>)

V1--V2:
1. Convert __get_str(str) to __print_symbolic()
2. Add new patches 1/6, 2/6,3/6
3. Use __print_symbolic() in patch 6/6

Bean Huo (6):
scsi: ufs: Remove stringize operator '#' restriction
scsi: ufs: Use __print_symbolic() for UFS trace string print
scsi: ufs: Don't call trace_ufshcd_upiu() in case trace poit is
disabled
scsi: ufs: Distinguish between query REQ and query RSP in query trace
scsi: ufs: Distinguish between TM request UPIU and response UPIU in TM
UPIU trace
scsi: ufs: Make UPIU trace easier differentiate among CDB, OSF, and TM

drivers/scsi/ufs/ufs.h | 17 ++++++
drivers/scsi/ufs/ufshcd.c | 72 ++++++++++++++++---------
include/trace/events/ufs.h | 108 +++++++++++++++++++++++--------------
3 files changed, 131 insertions(+), 66 deletions(-)

--
2.17.1


2021-01-05 20:07:16

by Bean Huo

[permalink] [raw]
Subject: [PATCH v4 5/6] scsi: ufs: Distinguish between TM request UPIU and response UPIU in TM UPIU trace

From: Bean Huo <[email protected]>

Distinguish between TM request UPIU and response UPIU in TM UPIU trace,
for the TM response, let TM UPIU trace print its TM response UPIU.

Acked-by: Avri Altman <[email protected]>
Acked-by: Steven Rostedt (VMware) <[email protected]>
Signed-off-by: Bean Huo <[email protected]>
---
drivers/scsi/ufs/ufshcd.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 6ccf71ab3b9c..4df17005e398 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -341,8 +341,12 @@ static void ufshcd_add_tm_upiu_trace(struct ufs_hba *hba, unsigned int tag,
if (!trace_ufshcd_upiu_enabled())
return;

- trace_ufshcd_upiu(dev_name(hba->dev), str_t, &descp->req_header,
- &descp->input_param1);
+ if (str_t == UFS_TM_SEND)
+ trace_ufshcd_upiu(dev_name(hba->dev), str_t, &descp->req_header,
+ &descp->input_param1);
+ else
+ trace_ufshcd_upiu(dev_name(hba->dev), str_t, &descp->rsp_header,
+ &descp->output_param1);
}

static void ufshcd_add_uic_command_trace(struct ufs_hba *hba,
--
2.17.1

2021-01-08 03:35:39

by Martin K. Petersen

[permalink] [raw]
Subject: Re: [PATCH v4 0/6] Several changes for the UPIU trace


Bean,

> Bean Huo (6):
> scsi: ufs: Remove stringize operator '#' restriction
> scsi: ufs: Use __print_symbolic() for UFS trace string print
> scsi: ufs: Don't call trace_ufshcd_upiu() in case trace poit is
> disabled
> scsi: ufs: Distinguish between query REQ and query RSP in query trace
> scsi: ufs: Distinguish between TM request UPIU and response UPIU in TM
> UPIU trace
> scsi: ufs: Make UPIU trace easier differentiate among CDB, OSF, and TM

Applied to 5.12/scsi-staging, thanks!

--
Martin K. Petersen Oracle Linux Engineering

2021-01-13 05:53:50

by Martin K. Petersen

[permalink] [raw]
Subject: Re: [PATCH v4 0/6] Several changes for the UPIU trace

On Tue, 5 Jan 2021 12:34:40 +0100, Bean Huo wrote:

> Changelog:
>
> V3--v4:
> 1. Rebase patch onto 5.12/scsi-queue
> 2. Incorporate Avri's suggestion in patch 2/6
>
> V2--V3:
> 1. Fix a typo in patch 1/6 (Reported-by: Joe Perches <[email protected]>)
>
> [...]

Applied to 5.12/scsi-queue, thanks!

[1/6] scsi: ufs: Remove stringize operator '#' restriction
https://git.kernel.org/mkp/scsi/c/c7c730ac6a88
[2/6] scsi: ufs: Use __print_symbolic() for UFS trace string print
https://git.kernel.org/mkp/scsi/c/28fa68fc557a
[3/6] scsi: ufs: Don't call trace_ufshcd_upiu() in case trace poit is disabled
https://git.kernel.org/mkp/scsi/c/9d5095e74c83
[4/6] scsi: ufs: Distinguish between query REQ and query RSP in query trace
https://git.kernel.org/mkp/scsi/c/be20b51cfd85
[5/6] scsi: ufs: Distinguish between TM request UPIU and response UPIU in TM UPIU trace
https://git.kernel.org/mkp/scsi/c/0ed083e91662
[6/6] scsi: ufs: Make UPIU trace easier differentiate among CDB, OSF, and TM
https://git.kernel.org/mkp/scsi/c/867fdc2d6e34

--
Martin K. Petersen Oracle Linux Engineering