OSDN Git Service

scsi: ufs: core: Let UPIU completion trace print RSP UPIU header
authorBean Huo <beanhuo@micron.com>
Mon, 31 May 2021 10:43:06 +0000 (12:43 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 8 Jun 2021 02:35:58 +0000 (22:35 -0400)
commit89ac2c3b283508744de9bc2fba2b57a523990db7
tree7f15a11f375d099da63fc2bf0913bee874c82904
parent04c073feb1d7b396992b3c725101872d5fc104b6
scsi: ufs: core: Let UPIU completion trace print RSP UPIU header

The current UPIU completion event trace still prints the COMMAND UPIU
header, rather than the RSP UPIU header. This makes UPIU command trace
useless in problem shooting in case we receive a trace log from the
customer/field.

There are two important fields in RSP UPIU:

 1. The response field, which indicates the UFS defined overall success or
    failure of the series of Command, Data and RESPONSE UPIU’s that make up
    the execution of a task.

2. The Status field, which contains the command set specific status for a
    specific command issued by the initiator device.

Before this commit, the UPIU paired trace events:

ufshcd_upiu: send_req: fe3b0000.ufs: HDR:01 20 00 1c 00 00 00 00 00 00 00 00, CDB:3b e1 00 00 00 00 00 00 30 00 00 00 00 00 00 00
ufshcd_upiu: complete_rsp: fe3b0000.ufs: HDR:01 20 00 1c 00 00 00 00 00 00 00 00, CDB:3b e1 00 00 00 00 00 00 30 00 00 00 00 00 00 00

After this commit:

ufshcd_upiu: send_req: fe3b0000.ufs: HDR:01 20 00 1c 00 00 00 00 00 00 00 00, CDB:3b e1 00 00 00 00 00 00 30 00 00 00 00 00 00 00
ufshcd_upiu: complete_rsp: fe3b0000.ufs: HDR:21 00 00 1c 00 00 00 00 00 00 00 00, CDB:3b e1 00 00 00 00 00 00 30 00 00 00 00 00 00 00

Link: https://lore.kernel.org/r/20210531104308.391842-3-huobean@gmail.com
Reviewed-by: Can Guo <cang@codeaurora.org>
Signed-off-by: Bean Huo <beanhuo@micron.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ufs/ufshcd.c