Loading drivers/scsi/ufs/ufshcd.c +16 −2 Original line number Diff line number Diff line Loading @@ -5562,8 +5562,15 @@ ufshcd_transfer_rsp_status(struct ufs_hba *hba, struct ufshcd_lrb *lrbp) * UFS device needs urgent BKOPs. */ if (!hba->pm_op_in_progress && ufshcd_is_exception_event(lrbp->ucd_rsp_ptr)) schedule_work(&hba->eeh_work); ufshcd_is_exception_event(lrbp->ucd_rsp_ptr)) { /* * Prevent suspend once eeh_work is scheduled * to avoid deadlock between ufshcd_suspend * and exception event handler. */ if (schedule_work(&hba->eeh_work)) pm_runtime_get_noresume(hba->dev); } break; case UPIU_TRANSACTION_REJECT_UPIU: /* TODO: handle Reject UPIU Response */ Loading Loading @@ -6147,6 +6154,13 @@ static void ufshcd_exception_event_handler(struct work_struct *work) out: ufshcd_scsi_unblock_requests(hba); /* * pm_runtime_get_noresume is called while scheduling * eeh_work to avoid suspend racing with exception work. * Hence decrement usage counter using pm_runtime_put_noidle * to allow suspend on completion of exception event handler. */ pm_runtime_put_noidle(hba->dev); pm_runtime_put(hba->dev); return; } Loading Loading
drivers/scsi/ufs/ufshcd.c +16 −2 Original line number Diff line number Diff line Loading @@ -5562,8 +5562,15 @@ ufshcd_transfer_rsp_status(struct ufs_hba *hba, struct ufshcd_lrb *lrbp) * UFS device needs urgent BKOPs. */ if (!hba->pm_op_in_progress && ufshcd_is_exception_event(lrbp->ucd_rsp_ptr)) schedule_work(&hba->eeh_work); ufshcd_is_exception_event(lrbp->ucd_rsp_ptr)) { /* * Prevent suspend once eeh_work is scheduled * to avoid deadlock between ufshcd_suspend * and exception event handler. */ if (schedule_work(&hba->eeh_work)) pm_runtime_get_noresume(hba->dev); } break; case UPIU_TRANSACTION_REJECT_UPIU: /* TODO: handle Reject UPIU Response */ Loading Loading @@ -6147,6 +6154,13 @@ static void ufshcd_exception_event_handler(struct work_struct *work) out: ufshcd_scsi_unblock_requests(hba); /* * pm_runtime_get_noresume is called while scheduling * eeh_work to avoid suspend racing with exception work. * Hence decrement usage counter using pm_runtime_put_noidle * to allow suspend on completion of exception event handler. */ pm_runtime_put_noidle(hba->dev); pm_runtime_put(hba->dev); return; } Loading