diff options
-rw-r--r-- | drivers/scsi/scsi_error.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index d0f71e5d065f..804f63270e37 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c | |||
@@ -1687,6 +1687,20 @@ static void scsi_restart_operations(struct Scsi_Host *shost) | |||
1687 | * requests are started. | 1687 | * requests are started. |
1688 | */ | 1688 | */ |
1689 | scsi_run_host_queues(shost); | 1689 | scsi_run_host_queues(shost); |
1690 | |||
1691 | /* | ||
1692 | * if eh is active and host_eh_scheduled is pending we need to re-run | ||
1693 | * recovery. we do this check after scsi_run_host_queues() to allow | ||
1694 | * everything pent up since the last eh run a chance to make forward | ||
1695 | * progress before we sync again. Either we'll immediately re-run | ||
1696 | * recovery or scsi_device_unbusy() will wake us again when these | ||
1697 | * pending commands complete. | ||
1698 | */ | ||
1699 | spin_lock_irqsave(shost->host_lock, flags); | ||
1700 | if (shost->host_eh_scheduled) | ||
1701 | if (scsi_host_set_state(shost, SHOST_RECOVERY)) | ||
1702 | WARN_ON(scsi_host_set_state(shost, SHOST_CANCEL_RECOVERY)); | ||
1703 | spin_unlock_irqrestore(shost->host_lock, flags); | ||
1690 | } | 1704 | } |
1691 | 1705 | ||
1692 | /** | 1706 | /** |