From: "Ewan D. Milne" <emilne@xxxxxxxxxx> Commit 0d860641db6d49655b91cd08c8db5af74f88bcb5 ("disable eh_deadline if no host_reset_handler is set") did not prevent eh_deadline from being set via sysfs if shost->transportt was NULL. That logic is incorrect. The logic should prevent setting eh_deadline if: - A transport-specific eh_strategy_handler is provided or - The host driver has no eh_reset_handler ...because the eh_deadline value won't be used if a different EH strategy is provided, and won't work properly if the host can't be reset when the deadline expires. Signed-off-by: Ewan D. Milne <emilne@xxxxxxxxxx> --- drivers/scsi/scsi_sysfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c index 8dab6dd..facafc1 100644 --- a/drivers/scsi/scsi_sysfs.c +++ b/drivers/scsi/scsi_sysfs.c @@ -300,9 +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 || - !shost->hostt->eh_host_reset_handler)) + if ((shost->transportt && + shost->transportt->eh_strategy_handler) || + !shost->hostt->eh_host_reset_handler) return ret; if (!strncmp(buf, "off", strlen("off"))) -- 1.7.11.7 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html