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

Commit b90fc42a authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "scsi: ufs: fix race b/w resume and err_handler"

parents 5200784e 7ee6127e
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -10590,11 +10590,19 @@ static int ufshcd_resume(struct ufs_hba *hba, enum ufs_pm_op pm_op)
			 * we can proceed after checking the link and
			 * dev state.
			 */
			if ((host_byte(ret) == DID_TIME_OUT) &&
			    ufshcd_is_ufs_dev_active(hba) &&
			if (ufshcd_is_ufs_dev_active(hba) &&
			    ufshcd_is_link_active(hba))
				ret = 0;
			else

			else if ((work_pending(&hba->eh_work)) ||
				ufshcd_eh_in_progress(hba)) {
				flush_work(&hba->eh_work);
				ret = 0;
				dev_info(hba->dev, "dev pwr mode=%d, UIC link state=%d\n",
					hba->curr_dev_pwr_mode,
					hba->uic_link_state);
				}
			if (ret)
				goto set_old_link_state;
		}
	}