* [PATCH] scsi: ufs: flush eh_work when eh_work scheduled.
@ 2017-06-24 11:14 Zang Leigang
2017-06-28 23:45 ` Subhash Jadavani
2017-07-01 20:51 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: Zang Leigang @ 2017-06-24 11:14 UTC (permalink / raw)
To: vinholikatti, jejb, martin.petersen; +Cc: linux-scsi
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__);
--
2.13.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: ufs: flush eh_work when eh_work scheduled.
2017-06-24 11:14 [PATCH] scsi: ufs: flush eh_work when eh_work scheduled Zang Leigang
@ 2017-06-28 23:45 ` Subhash Jadavani
2017-07-01 20:51 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Subhash Jadavani @ 2017-06-28 23:45 UTC (permalink / raw)
To: Zang Leigang
Cc: vinholikatti, jejb, martin.petersen, linux-scsi, linux-scsi-owner
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>
--
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: ufs: flush eh_work when eh_work scheduled.
2017-06-24 11:14 [PATCH] scsi: ufs: flush eh_work when eh_work scheduled Zang Leigang
2017-06-28 23:45 ` Subhash Jadavani
@ 2017-07-01 20:51 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2017-07-01 20:51 UTC (permalink / raw)
To: Zang Leigang; +Cc: vinholikatti, jejb, martin.petersen, linux-scsi
Zang,
> Forget a condition: eh_work scheduled but do not start to work.
Applied to 4.13/scsi-queue.
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-07-01 20:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-24 11:14 [PATCH] scsi: ufs: flush eh_work when eh_work scheduled Zang Leigang
2017-06-28 23:45 ` Subhash Jadavani
2017-07-01 20:51 ` Martin K. Petersen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.