From c9b5e366093e549542b5ad72d3e739fe64508b08 Mon Sep 17 00:00:00 2001 From: Lin Ming Date: Mon, 5 Dec 2011 09:20:24 +0800 Subject: [PATCH] --- yaml --- r: 282109 b: refs/heads/master c: ae0751ffc77e7f21629970fdab5528c573e637f8 h: refs/heads/master i: 282107: 8b00db53032de86f0a5fc0f400b97a56b5da8505 v: v3 --- [refs] | 2 +- trunk/drivers/scsi/scsi_error.c | 5 +++-- trunk/include/scsi/scsi_host.h | 3 +++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index dc1ed5be47d4..d2a9f561c2ff 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9a6d6a2ddabbd32c07f6a38b659e5f3db319fa5a +refs/heads/master: ae0751ffc77e7f21629970fdab5528c573e637f8 diff --git a/trunk/drivers/scsi/scsi_error.c b/trunk/drivers/scsi/scsi_error.c index dc6131e6a1ba..5f84a148eb14 100644 --- a/trunk/drivers/scsi/scsi_error.c +++ b/trunk/drivers/scsi/scsi_error.c @@ -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); diff --git a/trunk/include/scsi/scsi_host.h b/trunk/include/scsi/scsi_host.h index 50266c9405fc..5f7d5b3b1c6e 100644 --- a/trunk/include/scsi/scsi_host.h +++ b/trunk/include/scsi/scsi_host.h @@ -669,6 +669,9 @@ struct Scsi_Host { /* Asynchronous scan in progress */ unsigned async_scan:1; + /* Don't resume host in EH */ + unsigned eh_noresume:1; + /* * Optional work queue to be utilized by the transport */