Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e7c3b379 authored by Ohad Sharabi's avatar Ohad Sharabi Committed by Martin K. Petersen
Browse files

scsi: ufs: remove unnecessary query(DM) UPIU trace



This patch removes redundant trace that occurs when sending Device
Management(DM) request (fix behavior in commit 6667e6d9 ("scsi:
ufs: add trace event for ufs upiu").

Since the function send_command is called also for DM request, UPIU
trace for DM request is called twice- one identified as query_* the
other as send/complete.

Signed-off-by: default avatarOhad Sharabi <ohad.sharabi@wdc.com>
Fixes: 6667e6d9 ("scsi: ufs: add trace event for ufs upiu")
Reviewed-by: default avatarStanislav Nijnikov <stanislav.nijnikov@wdc.com>
Reviewed-by: default avatarAvri Altman <avri.altman@wdc.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent e9f7be0c
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -342,18 +342,19 @@ static void ufshcd_add_command_trace(struct ufs_hba *hba,
	sector_t lba = -1;
	u8 opcode = 0;
	u32 intr, doorbell;
	struct ufshcd_lrb *lrbp;
	struct ufshcd_lrb *lrbp = &hba->lrb[tag];
	int transfer_len = -1;

	/* trace UPIU also */
	if (!trace_ufshcd_command_enabled()) {
		/* trace UPIU W/O tracing command */
		if (lrbp->cmd)
			ufshcd_add_cmd_upiu_trace(hba, tag, str);

	if (!trace_ufshcd_command_enabled())
		return;

	lrbp = &hba->lrb[tag];
	}

	if (lrbp->cmd) { /* data phase exists */
		/* trace UPIU also */
		ufshcd_add_cmd_upiu_trace(hba, tag, str);
		opcode = (u8)(*lrbp->cmd->cmnd);
		if ((opcode == READ_10) || (opcode == WRITE_10)) {
			/*