From 0816c9251a7180383bb7811e1a1545f7b78e5374 Mon Sep 17 00:00:00 2001 From: "Martin K. Petersen" Date: Fri, 10 May 2013 10:36:04 -0400 Subject: [SCSI] Allow error handling timeout to be specified Introduce eh_timeout which can be used for error handling purposes. This was previously hardcoded to 10 seconds in the SCSI error handling code. However, for some fast-fail scenarios it is necessary to be able to tune this as it can take several iterations (bus device, target, bus, controller) before we give up. Signed-off-by: Martin K. Petersen Signed-off-by: James Bottomley --- include/scsi/scsi.h | 5 +++++ include/scsi/scsi_device.h | 1 + 2 files changed, 6 insertions(+) (limited to 'include/scsi') diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h index 66216c1acb4..4b87d99e7fa 100644 --- a/include/scsi/scsi.h +++ b/include/scsi/scsi.h @@ -10,9 +10,14 @@ #include #include +#include struct scsi_cmnd; +enum scsi_timeouts { + SCSI_DEFAULT_EH_TIMEOUT = 10 * HZ, +}; + /* * The maximum number of SG segments that we will put inside a * scatterlist (unless chaining is used). Should ideally fit inside a diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index cc645876d14..a44954c7cdc 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h @@ -113,6 +113,7 @@ struct scsi_device { * scsi_devinfo.[hc]. For now used only to * pass settings from slave_alloc to scsi * core. */ + unsigned int eh_timeout; /* Error handling timeout */ unsigned writeable:1; unsigned removable:1; unsigned changed:1; /* Data invalid due to media change */ -- cgit v1.2.3-18-g5258