ANDROID: scsi: ufs: Support I/O tracing for zoned block devices
Let's support tracing for WRITE(16), READ(16), ZBC IN and ZBC OUT. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> Bug: 269471019 Bug: 415836627 Link: https://lore.kernel.org/linux-scsi/20230215190448.1687786-1-jaegeuk@kernel.org/ Change-Id: Ie6a1e42b8fdf38a21ca45de0b2384550171cbcdd Signed-off-by: Bart Van Assche <bvanassche@google.com>
This commit is contained in:
@@ -19,7 +19,9 @@
|
|||||||
{ READ_16, "READ_16" }, \
|
{ READ_16, "READ_16" }, \
|
||||||
{ READ_10, "READ_10" }, \
|
{ READ_10, "READ_10" }, \
|
||||||
{ SYNCHRONIZE_CACHE, "SYNC" }, \
|
{ SYNCHRONIZE_CACHE, "SYNC" }, \
|
||||||
{ UNMAP, "UNMAP" })
|
{ UNMAP, "UNMAP" }, \
|
||||||
|
{ ZBC_IN, "ZBC_IN" }, \
|
||||||
|
{ ZBC_OUT, "ZBC_OUT" })
|
||||||
|
|
||||||
#define UFS_LINK_STATES \
|
#define UFS_LINK_STATES \
|
||||||
EM(UIC_LINK_OFF_STATE, "UIC_LINK_OFF_STATE") \
|
EM(UIC_LINK_OFF_STATE, "UIC_LINK_OFF_STATE") \
|
||||||
|
|||||||
@@ -491,15 +491,15 @@ static void ufshcd_add_command_trace(struct ufs_hba *hba, unsigned int tag,
|
|||||||
|
|
||||||
opcode = cmd->cmnd[0];
|
opcode = cmd->cmnd[0];
|
||||||
|
|
||||||
if (opcode == READ_10 || opcode == WRITE_10) {
|
if (opcode == READ_10 || opcode == WRITE_10 ||
|
||||||
/*
|
opcode == READ_16 || opcode == WRITE_16) {
|
||||||
* Currently we only fully trace read(10) and write(10) commands
|
|
||||||
*/
|
|
||||||
transfer_len =
|
transfer_len =
|
||||||
be32_to_cpu(lrbp->ucd_req_ptr->sc.exp_data_transfer_len);
|
be32_to_cpu(lrbp->ucd_req_ptr->sc.exp_data_transfer_len);
|
||||||
lba = scsi_get_lba(cmd);
|
lba = scsi_get_lba(cmd);
|
||||||
if (opcode == WRITE_10)
|
if (opcode == WRITE_10)
|
||||||
group_id = lrbp->cmd->cmnd[6];
|
group_id = lrbp->cmd->cmnd[6];
|
||||||
|
if (opcode == WRITE_16)
|
||||||
|
group_id = lrbp->cmd->cmnd[14];
|
||||||
} else if (opcode == UNMAP) {
|
} else if (opcode == UNMAP) {
|
||||||
/*
|
/*
|
||||||
* The number of Bytes to be unmapped beginning with the lba.
|
* The number of Bytes to be unmapped beginning with the lba.
|
||||||
|
|||||||
Reference in New Issue
Block a user