mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
scsi: ufs: core: Change the type of one ufshcd_add_command_trace() argument
Change the 'tag' argument into a SCSI command pointer. This patch prepares for the removal of the hba->lrb[] array. Reviewed-by: Avri Altman <avri.altman@sandisk.com> Reviewed-by: Peter Wang <peter.wang@mediatek.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://patch.msgid.link/20251031204029.2883185-12-bvanassche@acm.org Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
committed by
Martin K. Petersen
parent
60a1f6a8ad
commit
ffa5d8c153
@@ -473,7 +473,7 @@ static void ufshcd_add_uic_command_trace(struct ufs_hba *hba,
|
||||
ufshcd_readl(hba, REG_UIC_COMMAND_ARG_3));
|
||||
}
|
||||
|
||||
static void ufshcd_add_command_trace(struct ufs_hba *hba, unsigned int tag,
|
||||
static void ufshcd_add_command_trace(struct ufs_hba *hba, struct scsi_cmnd *cmd,
|
||||
enum ufs_trace_str_t str_t)
|
||||
{
|
||||
u64 lba = 0;
|
||||
@@ -481,9 +481,9 @@ static void ufshcd_add_command_trace(struct ufs_hba *hba, unsigned int tag,
|
||||
u32 doorbell = 0;
|
||||
u32 intr;
|
||||
u32 hwq_id = 0;
|
||||
struct ufshcd_lrb *lrbp = &hba->lrb[tag];
|
||||
struct scsi_cmnd *cmd = lrbp->cmd;
|
||||
struct request *rq = scsi_cmd_to_rq(cmd);
|
||||
unsigned int tag = rq->tag;
|
||||
struct ufshcd_lrb *lrbp = &hba->lrb[tag];
|
||||
int transfer_len = -1;
|
||||
|
||||
/* trace UPIU also */
|
||||
@@ -501,7 +501,7 @@ static void ufshcd_add_command_trace(struct ufs_hba *hba, unsigned int tag,
|
||||
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];
|
||||
group_id = cmd->cmnd[6];
|
||||
} else if (opcode == UNMAP) {
|
||||
/*
|
||||
* The number of Bytes to be unmapped beginning with the lba.
|
||||
@@ -2367,7 +2367,7 @@ void ufshcd_send_command(struct ufs_hba *hba, unsigned int task_tag,
|
||||
lrbp->compl_time_stamp_local_clock = 0;
|
||||
}
|
||||
if (lrbp->cmd) {
|
||||
ufshcd_add_command_trace(hba, task_tag, UFS_CMD_SEND);
|
||||
ufshcd_add_command_trace(hba, lrbp->cmd, UFS_CMD_SEND);
|
||||
ufshcd_clk_scaling_start_busy(hba);
|
||||
}
|
||||
if (unlikely(ufshcd_should_inform_monitor(hba, lrbp)))
|
||||
@@ -5641,7 +5641,7 @@ void ufshcd_compl_one_cqe(struct ufs_hba *hba, int task_tag,
|
||||
if (cmd) {
|
||||
if (unlikely(ufshcd_should_inform_monitor(hba, lrbp)))
|
||||
ufshcd_update_monitor(hba, lrbp);
|
||||
ufshcd_add_command_trace(hba, task_tag, UFS_CMD_COMP);
|
||||
ufshcd_add_command_trace(hba, cmd, UFS_CMD_COMP);
|
||||
cmd->result = ufshcd_transfer_rsp_status(hba, lrbp, cqe);
|
||||
ufshcd_release_scsi_cmd(hba, lrbp);
|
||||
/* Do not touch lrbp after scsi done */
|
||||
|
||||
Reference in New Issue
Block a user