summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_sysfs.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 18:18:59 +0100
commitad469a57643b322dc7a3bfc482e265e1e88f735a (patch)
treee2513e85e9ba617e02ddc302a1acbfd10fff9fcf /drivers/scsi/scsi_sysfs.c
parent[SCSI] dual scan thread bug fix (diff)
downloadlinux-ad469a57643b322dc7a3bfc482e265e1e88f735a.tar.xz
linux-ad469a57643b322dc7a3bfc482e265e1e88f735a.zip
[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/scsi_sysfs.c')
-rw-r--r--drivers/scsi/scsi_sysfs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
index 665acbf83693..8dab6ddf8222 100644
--- a/drivers/scsi/scsi_sysfs.c
+++ b/drivers/scsi/scsi_sysfs.c
@@ -300,7 +300,9 @@ store_shost_eh_deadline(struct device *dev, struct device_attribute *attr,
int ret = -EINVAL;
unsigned long deadline, flags;
- if (shost->transportt && shost->transportt->eh_strategy_handler)
+ if (shost->transportt &&
+ (shost->transportt->eh_strategy_handler ||
+ !shost->hostt->eh_host_reset_handler))
return ret;
if (!strncmp(buf, "off", strlen("off")))