@@ -5093,6 +5093,7 @@ static void __ufshcd_transfer_req_compl(struct ufs_hba *hba,
lrbp->in_use = false;
lrbp->compl_time_stamp = ktime_get();
cmd = lrbp->cmd;
+ ufshcd_vops_compl_xfer_req(hba, index, (cmd) ? true : false);
if (cmd) {
ufshcd_add_command_trace(hba, index, UFS_CMD_COMP);
result = ufshcd_transfer_rsp_status(hba, lrbp);
@@ -343,6 +343,7 @@ struct ufs_hba_variant_ops {
struct ufs_pa_layer_attr *,
struct ufs_pa_layer_attr *);
void (*setup_xfer_req)(struct ufs_hba *, int, bool);
+ void (*compl_xfer_req)(struct ufs_hba *hba, int tag, bool is_scsi);
void (*setup_task_mgmt)(struct ufs_hba *, int, u8);
void (*hibern8_notify)(struct ufs_hba *, enum uic_cmd_dme,
enum ufs_notify_change_status);
@@ -1199,6 +1200,13 @@ static inline void ufshcd_vops_setup_xfer_req(struct ufs_hba *hba, int tag,
return hba->vops->setup_xfer_req(hba, tag, is_scsi_cmd);
}
+static inline void ufshcd_vops_compl_xfer_req(struct ufs_hba *hba,
+ int tag, bool is_scsi)
+{
+ if (hba->vops && hba->vops->compl_xfer_req)
+ hba->vops->compl_xfer_req(hba, tag, is_scsi);
+}
+
static inline void ufshcd_vops_setup_task_mgmt(struct ufs_hba *hba,
int tag, u8 tm_function)
{