Message ID | 20170624111432.11852-1-zangleigang@hisilicon.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
On 2017-06-24 04:14, Zang Leigang wrote: > Forget a condition: eh_work scheduled but do not start to work. > > Signed-off-by: Zang Leigang <zangleigang@hisilicon.com> > > diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c > index e050dcea1bea..a2dff12713fc 100644 > --- a/drivers/scsi/ufs/ufshcd.c > +++ b/drivers/scsi/ufs/ufshcd.c > @@ -5807,7 +5807,8 @@ static int ufshcd_eh_host_reset_handler(struct > scsi_cmnd *cmd) > do { > spin_lock_irqsave(hba->host->host_lock, flags); > if (!(work_pending(&hba->eh_work) || > - hba->ufshcd_state == UFSHCD_STATE_RESET)) > + hba->ufshcd_state == UFSHCD_STATE_RESET || > + hba->ufshcd_state == UFSHCD_STATE_EH_SCHEDULED)) > break; > spin_unlock_irqrestore(hba->host->host_lock, flags); > dev_dbg(hba->dev, "%s: reset in progress\n", __func__); Looks good to me. Reviewed-by: Subhash Jadavani <subhashj@codeaurora.org>
Zang,
> Forget a condition: eh_work scheduled but do not start to work.
Applied to 4.13/scsi-queue.
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index e050dcea1bea..a2dff12713fc 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -5807,7 +5807,8 @@ static int ufshcd_eh_host_reset_handler(struct scsi_cmnd *cmd) do { spin_lock_irqsave(hba->host->host_lock, flags); if (!(work_pending(&hba->eh_work) || - hba->ufshcd_state == UFSHCD_STATE_RESET)) + hba->ufshcd_state == UFSHCD_STATE_RESET || + hba->ufshcd_state == UFSHCD_STATE_EH_SCHEDULED)) break; spin_unlock_irqrestore(hba->host->host_lock, flags); dev_dbg(hba->dev, "%s: reset in progress\n", __func__);
Forget a condition: eh_work scheduled but do not start to work. Signed-off-by: Zang Leigang <zangleigang@hisilicon.com>