summaryrefslogtreecommitdiff
path: root/drivers/scsi/hosts.c
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2014-01-17 16:05:38 +0100
committerJames Bottomley <JBottomley@Parallels.com>2014-03-15 10:18:59 -0700
commitad469a57643b322dc7a3bfc482e265e1e88f735a (patch)
treee2513e85e9ba617e02ddc302a1acbfd10fff9fcf /drivers/scsi/hosts.c
parentf2495e228fce9f9cec84367547813cbb0d6db15a (diff)
[SCSI] scsi_error: disable eh_deadline if no host_reset_handler is set
When the host template doesn't declare an eh_host_reset_handler the eh_deadline mechanism is pointless and will set the device to offline. So disable eh_deadline if no eh_host_reset_handler is present. Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/hosts.c')
-rw-r--r--drivers/scsi/hosts.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c
index f28ea070d3df..3cbb57a8b846 100644
--- a/drivers/scsi/hosts.c
+++ b/drivers/scsi/hosts.c
@@ -398,7 +398,7 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize)
shost->ordered_tag = sht->ordered_tag;
shost->no_write_same = sht->no_write_same;
- if (shost_eh_deadline == -1)
+ if (shost_eh_deadline == -1 || !sht->eh_host_reset_handler)
shost->eh_deadline = -1;
else if ((ulong) shost_eh_deadline * HZ > INT_MAX) {
shost_printk(KERN_WARNING, shost,