aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi
diff options
context:
space:
mode:
authorMartin K. Petersen <martin.petersen@oracle.com>2013-05-10 10:36:04 -0400
committerJames Bottomley <JBottomley@Parallels.com>2013-06-04 14:16:24 -0400
commit0816c9251a7180383bb7811e1a1545f7b78e5374 (patch)
tree1dffcde9c45f276b264c83511b6168baab4307a4 /include/scsi
parent0761df9c4b2d966da3af2ac4ee7372afa681ce63 (diff)
[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 <martin.petersen@oracle.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/scsi.h5
-rw-r--r--include/scsi/scsi_device.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h
index 66216c1acb48..4b87d99e7fa1 100644
--- a/include/scsi/scsi.h
+++ b/include/scsi/scsi.h
@@ -10,9 +10,14 @@
10 10
11#include <linux/types.h> 11#include <linux/types.h>
12#include <linux/scatterlist.h> 12#include <linux/scatterlist.h>
13#include <linux/kernel.h>
13 14
14struct scsi_cmnd; 15struct scsi_cmnd;
15 16
17enum scsi_timeouts {
18 SCSI_DEFAULT_EH_TIMEOUT = 10 * HZ,
19};
20
16/* 21/*
17 * The maximum number of SG segments that we will put inside a 22 * The maximum number of SG segments that we will put inside a
18 * scatterlist (unless chaining is used). Should ideally fit inside a 23 * 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 cc645876d147..a44954c7cdc2 100644
--- a/include/scsi/scsi_device.h
+++ b/include/scsi/scsi_device.h
@@ -113,6 +113,7 @@ struct scsi_device {
113 * scsi_devinfo.[hc]. For now used only to 113 * scsi_devinfo.[hc]. For now used only to
114 * pass settings from slave_alloc to scsi 114 * pass settings from slave_alloc to scsi
115 * core. */ 115 * core. */
116 unsigned int eh_timeout; /* Error handling timeout */
116 unsigned writeable:1; 117 unsigned writeable:1;
117 unsigned removable:1; 118 unsigned removable:1;
118 unsigned changed:1; /* Data invalid due to media change */ 119 unsigned changed:1; /* Data invalid due to media change */