[PATCH 1/1] scsi: scsi inquiry timeout config option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add a .config option to default the scsi scan inquiry timeout.
Due to a broken device (SCSI/ATA converter card) that is very
common on IBM iSeries/pSeries machines, these architectures
need a longer default inquiry timeout.

Signed-off-by: Brian King <brking@xxxxxxxxxx>
---

 linux-2.6-bjking1/arch/ppc64/configs/iSeries_defconfig |    1 +
 linux-2.6-bjking1/arch/ppc64/configs/pSeries_defconfig |    1 +
 linux-2.6-bjking1/drivers/scsi/Kconfig                 |    8 ++++++++
 linux-2.6-bjking1/drivers/scsi/scsi_scan.c             |    2 +-
 4 files changed, 11 insertions(+), 1 deletion(-)

diff -puN drivers/scsi/Kconfig~scsi_inq_timeout_config drivers/scsi/Kconfig
--- linux-2.6/drivers/scsi/Kconfig~scsi_inq_timeout_config	2005-10-03 11:15:08.000000000 -0500
+++ linux-2.6-bjking1/drivers/scsi/Kconfig	2005-10-03 11:17:37.000000000 -0500
@@ -209,6 +209,14 @@ config SCSI_LOGGING
 	  there should be no noticeable performance impact as long as you have
 	  logging turned off.
 
+config SCSI_INQUIRY_TIMEOUT
+	int "default timeout in seconds for INQUIRY scan"
+	depends on SCSI
+	default "5"
+	---help---
+	  Timeout (in seconds) waiting for devices to answer INQUIRY.
+	  Default is 5. Some non-compliant devices need more.
+
 menu "SCSI Transport Attributes"
 	depends on SCSI
 
diff -puN drivers/scsi/scsi_scan.c~scsi_inq_timeout_config drivers/scsi/scsi_scan.c
--- linux-2.6/drivers/scsi/scsi_scan.c~scsi_inq_timeout_config	2005-10-03 11:17:44.000000000 -0500
+++ linux-2.6-bjking1/drivers/scsi/scsi_scan.c	2005-10-03 11:18:58.000000000 -0500
@@ -102,7 +102,7 @@ MODULE_PARM_DESC(max_report_luns,
 		 "REPORT LUNS maximum number of LUNS received (should be"
 		 " between 1 and 16384)");
 
-static unsigned int scsi_inq_timeout = SCSI_TIMEOUT/HZ+3;
+static unsigned int scsi_inq_timeout = CONFIG_SCSI_INQUIRY_TIMEOUT;
 
 module_param_named(inq_timeout, scsi_inq_timeout, int, S_IRUGO|S_IWUSR);
 MODULE_PARM_DESC(inq_timeout, 
diff -puN arch/ppc64/configs/pSeries_defconfig~scsi_inq_timeout_config arch/ppc64/configs/pSeries_defconfig
--- linux-2.6/arch/ppc64/configs/pSeries_defconfig~scsi_inq_timeout_config	2005-10-03 11:19:18.000000000 -0500
+++ linux-2.6-bjking1/arch/ppc64/configs/pSeries_defconfig	2005-10-03 11:21:18.000000000 -0500
@@ -436,6 +436,7 @@ CONFIG_CHR_DEV_SG=y
 CONFIG_SCSI_MULTI_LUN=y
 CONFIG_SCSI_CONSTANTS=y
 # CONFIG_SCSI_LOGGING is not set
+CONFIG_SCSI_INQUIRY_TIMEOUT=30
 
 #
 # SCSI Transport Attributes
diff -puN arch/ppc64/configs/iSeries_defconfig~scsi_inq_timeout_config arch/ppc64/configs/iSeries_defconfig
--- linux-2.6/arch/ppc64/configs/iSeries_defconfig~scsi_inq_timeout_config	2005-10-03 11:24:14.000000000 -0500
+++ linux-2.6-bjking1/arch/ppc64/configs/iSeries_defconfig	2005-10-03 11:24:29.000000000 -0500
@@ -343,6 +343,7 @@ CONFIG_CHR_DEV_SG=y
 CONFIG_SCSI_MULTI_LUN=y
 CONFIG_SCSI_CONSTANTS=y
 # CONFIG_SCSI_LOGGING is not set
+CONFIG_SCSI_INQUIRY_TIMEOUT=30
 
 #
 # SCSI Transport Attributes
_
-
: 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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux