mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
FROMLIST: scsi: ufs: support IO traces for zoned block device
Let's support WRITE_16, READ_16, ZBC_IN, ZBC_OUT. Bug: 197782466 Link: https://lore.kernel.org/lkml/20230215190448.1687786-1-jaegeuk@kernel.org/T/#u Signed-off-by: Jaegeuk Kim <jaegeuk@google.com> Change-Id: I7bd9b9cddf2074c550f36ac692519b1d1eb617dd
This commit is contained in:
@@ -445,15 +445,15 @@ static void ufshcd_add_command_trace(struct ufs_hba *hba, unsigned int tag,
|
||||
|
||||
opcode = cmd->cmnd[0];
|
||||
|
||||
if (opcode == READ_10 || opcode == WRITE_10) {
|
||||
/*
|
||||
* Currently we only fully trace read(10) and write(10) commands
|
||||
*/
|
||||
if (opcode == READ_10 || opcode == WRITE_10 ||
|
||||
opcode == READ_16 || opcode == WRITE_16) {
|
||||
transfer_len =
|
||||
be32_to_cpu(lrbp->ucd_req_ptr->sc.exp_data_transfer_len);
|
||||
lba = scsi_get_lba(cmd);
|
||||
if (opcode == WRITE_10)
|
||||
group_id = lrbp->cmd->cmnd[6];
|
||||
if (opcode == WRITE_16)
|
||||
group_id = lrbp->cmd->cmnd[14];
|
||||
} else if (opcode == UNMAP) {
|
||||
/*
|
||||
* The number of Bytes to be unmapped beginning with the lba.
|
||||
|
||||
@@ -18,7 +18,9 @@
|
||||
{ READ_16, "READ_16" }, \
|
||||
{ READ_10, "READ_10" }, \
|
||||
{ SYNCHRONIZE_CACHE, "SYNC" }, \
|
||||
{ UNMAP, "UNMAP" })
|
||||
{ UNMAP, "UNMAP" }, \
|
||||
{ ZBC_IN, "ZBC_IN" }, \
|
||||
{ ZBC_OUT, "ZBC_OUT" })
|
||||
|
||||
#define UFS_LINK_STATES \
|
||||
EM(UIC_LINK_OFF_STATE, "UIC_LINK_OFF_STATE") \
|
||||
|
||||
Reference in New Issue
Block a user