[SCSI] Correctly set the scsi host/msg/status bytes
[deliverable/linux.git] / drivers / scsi / scsi_error.c
index dc6131e6a1ba2d40fe32504f1cb0e0f8d8b41def..5f84a148eb142417d9e296191329a6126e89ef4a 100644 (file)
@@ -1812,7 +1812,7 @@ int scsi_error_handler(void *data)
                 * what we need to do to get it up and online again (if we can).
                 * If we fail, we end up taking the thing offline.
                 */
-               if (scsi_autopm_get_host(shost) != 0) {
+               if (!shost->eh_noresume && scsi_autopm_get_host(shost) != 0) {
                        SCSI_LOG_ERROR_RECOVERY(1,
                                printk(KERN_ERR "Error handler scsi_eh_%d "
                                                "unable to autoresume\n",
@@ -1833,7 +1833,8 @@ int scsi_error_handler(void *data)
                 * which are still online.
                 */
                scsi_restart_operations(shost);
-               scsi_autopm_put_host(shost);
+               if (!shost->eh_noresume)
+                       scsi_autopm_put_host(shost);
                set_current_state(TASK_INTERRUPTIBLE);
        }
        __set_current_state(TASK_RUNNING);
This page took 0.026192 seconds and 5 git commands to generate.