From: Bean Huo Date: Tue, 5 Jan 2021 11:34:45 +0000 (+0100) Subject: scsi: ufs: Distinguish between TM request UPIU and response UPIU in TM UPIU trace X-Git-Tag: v5.15~1607^2~218 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0ed083e916620a1ea95f7e0722ce8bcc001f9caf;p=platform%2Fkernel%2Flinux-starfive.git scsi: ufs: Distinguish between TM request UPIU and response UPIU in TM UPIU trace 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. Link: https://lore.kernel.org/r/20210105113446.16027-6-huobean@gmail.com Acked-by: Avri Altman Acked-by: Steven Rostedt (VMware) Signed-off-by: Bean Huo Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index b11633d..9879b79e 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,