ANDROID: scsi: ufs: add perf heuristic design
Added vendor hook to consider ufs host/device perf heuristic according to different platform/design Vendor/Platform can take necessary action according to their design/implementation Added vendor hook before calling UFS command ops - trace_android_vh_ufs_perf_huristic_ctrl Added vendor hook after sending UFS command to host - trace_android_vh_ufs_send_command_post_change Added vendor hook for abort success case - trace_android_vh_ufs_abort_success_ctrl Bug: 312806167 Signed-off-by: Sanjeev Yadav <sanjeev.y@mediatek.com> Signed-off-by: Browse Zhang <browse.zhang@mediatek.com> Change-Id: Ibd07480d1086ec82f2ba6a52e21da08750796221
This commit is contained in:
@@ -2105,6 +2105,7 @@ void ufshcd_send_command(struct ufs_hba *hba, unsigned int task_tag)
|
||||
}
|
||||
/* Make sure that doorbell is committed immediately */
|
||||
wmb();
|
||||
trace_android_vh_ufs_send_command_post_change(hba, lrbp);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2770,7 +2771,9 @@ static int ufshcd_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd)
|
||||
}
|
||||
/* Make sure descriptors are ready before ringing the doorbell */
|
||||
wmb();
|
||||
|
||||
trace_android_vh_ufs_perf_huristic_ctrl(hba, lrbp, &err);
|
||||
if (err)
|
||||
goto out;
|
||||
ufshcd_send_command(hba, tag);
|
||||
out:
|
||||
up_read(&hba->clk_scaling_lock);
|
||||
@@ -7049,8 +7052,10 @@ static int ufshcd_abort(struct scsi_cmnd *cmd)
|
||||
outstanding = __test_and_clear_bit(tag, &hba->outstanding_reqs);
|
||||
spin_unlock_irqrestore(host->host_lock, flags);
|
||||
|
||||
if (outstanding)
|
||||
if (outstanding) {
|
||||
ufshcd_release_scsi_cmd(hba, lrbp);
|
||||
trace_android_vh_ufs_abort_success_ctrl(hba, lrbp);
|
||||
}
|
||||
|
||||
err = SUCCESS;
|
||||
|
||||
|
Reference in New Issue
Block a user