aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_error.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/scsi_error.c')
-rw-r--r--drivers/scsi/scsi_error.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index 0fc8b48f052b..e9c451ba71fc 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -75,7 +75,7 @@ int scsi_eh_scmd_add(struct scsi_cmnd *scmd, int eh_flag)
75 75
76 scmd->eh_eflags |= eh_flag; 76 scmd->eh_eflags |= eh_flag;
77 list_add_tail(&scmd->eh_entry, &shost->eh_cmd_q); 77 list_add_tail(&scmd->eh_entry, &shost->eh_cmd_q);
78 set_bit(SHOST_RECOVERY, &shost->shost_state); 78 scsi_host_set_state(shost, SHOST_RECOVERY);
79 shost->host_failed++; 79 shost->host_failed++;
80 scsi_eh_wakeup(shost); 80 scsi_eh_wakeup(shost);
81 spin_unlock_irqrestore(shost->host_lock, flags); 81 spin_unlock_irqrestore(shost->host_lock, flags);
@@ -197,7 +197,8 @@ int scsi_block_when_processing_errors(struct scsi_device *sdev)
197{ 197{
198 int online; 198 int online;
199 199
200 wait_event(sdev->host->host_wait, (!test_bit(SHOST_RECOVERY, &sdev->host->shost_state))); 200 wait_event(sdev->host->host_wait, (sdev->host->shost_state !=
201 SHOST_RECOVERY));
201 202
202 online = scsi_device_online(sdev); 203 online = scsi_device_online(sdev);
203 204
@@ -1458,7 +1459,7 @@ static void scsi_restart_operations(struct Scsi_Host *shost)
1458 SCSI_LOG_ERROR_RECOVERY(3, printk("%s: waking up host to restart\n", 1459 SCSI_LOG_ERROR_RECOVERY(3, printk("%s: waking up host to restart\n",
1459 __FUNCTION__)); 1460 __FUNCTION__));
1460 1461
1461 clear_bit(SHOST_RECOVERY, &shost->shost_state); 1462 scsi_host_set_state(shost, SHOST_RUNNING);
1462 1463
1463 wake_up(&shost->host_wait); 1464 wake_up(&shost->host_wait);
1464 1465