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

brking at us.ibm.com brking at us.ibm.com
Tue Oct 4 06:26:30 EST 2005


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 at us.ibm.com>
---

 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
_



More information about the Linuxppc64-dev mailing list