linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] scsi: scsi inquiry timeout config option
@ 2005-10-03 20:26 brking
  2005-10-03 20:39 ` linas
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: brking @ 2005-10-03 20:26 UTC (permalink / raw)
  To: James.Bottomley; +Cc: linux-scsi, linuxppc64-dev, brking


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@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
_

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/1] scsi: scsi inquiry timeout config option
  2005-10-03 20:26 [PATCH 1/1] scsi: scsi inquiry timeout config option brking
@ 2005-10-03 20:39 ` linas
  2005-10-03 20:44   ` Brian King
  2005-10-03 21:01 ` James Bottomley
  2005-10-04 18:46 ` Christoph Hellwig
  2 siblings, 1 reply; 9+ messages in thread
From: linas @ 2005-10-03 20:39 UTC (permalink / raw)
  To: brking; +Cc: James.Bottomley, linuxppc64-dev, linux-scsi

On Mon, Oct 03, 2005 at 03:26:30PM -0500, brking@us.ibm.com was heard to remark:
> 
> 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.

Hmm, I thought I fixed this several yeas ago. I guess it didn't 
stay fixed? 

--linas

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/1] scsi: scsi inquiry timeout config option
  2005-10-03 20:39 ` linas
@ 2005-10-03 20:44   ` Brian King
  0 siblings, 0 replies; 9+ messages in thread
From: Brian King @ 2005-10-03 20:44 UTC (permalink / raw)
  To: linas; +Cc: James.Bottomley, linuxppc64-dev, linux-scsi

linas wrote:
> On Mon, Oct 03, 2005 at 03:26:30PM -0500, brking@us.ibm.com was heard to remark:
> 
>>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.
> 
> 
> Hmm, I thought I fixed this several yeas ago. I guess it didn't 
> stay fixed? 

Some distro kernels have the default inquiry timeout changed for ppc64, but
mainline only has the module parameter.

-- 
Brian King
eServer Storage I/O
IBM Linux Technology Center

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/1] scsi: scsi inquiry timeout config option
  2005-10-03 20:26 [PATCH 1/1] scsi: scsi inquiry timeout config option brking
  2005-10-03 20:39 ` linas
@ 2005-10-03 21:01 ` James Bottomley
  2005-10-03 21:31   ` Brian King
  2005-10-04 18:46 ` Christoph Hellwig
  2 siblings, 1 reply; 9+ messages in thread
From: James Bottomley @ 2005-10-03 21:01 UTC (permalink / raw)
  To: brking; +Cc: SCSI Mailing List, linuxppc64-dev

On Mon, 2005-10-03 at 15:26 -0500, brking@us.ibm.com wrote:
> 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.

The inquiry timeout has already been changed a while ago to be a module
parameter (or kernel parameter) for this very case.  Why does it now
need to be a config option as well?

James



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/1] scsi: scsi inquiry timeout config option
  2005-10-03 21:01 ` James Bottomley
@ 2005-10-03 21:31   ` Brian King
  2005-10-03 21:34     ` Randy.Dunlap
  0 siblings, 1 reply; 9+ messages in thread
From: Brian King @ 2005-10-03 21:31 UTC (permalink / raw)
  To: James Bottomley; +Cc: linuxppc64-dev, SCSI Mailing List

James Bottomley wrote:
> On Mon, 2005-10-03 at 15:26 -0500, brking@us.ibm.com wrote:
> 
>>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.
> 
> 
> The inquiry timeout has already been changed a while ago to be a module
> parameter (or kernel parameter) for this very case.  Why does it now
> need to be a config option as well?

So that when a distro goes off and builds a PPC64 install kernel,
it can boot on one of these broken DVD-ROMs without requiring each
distro to add special module options inside their initrd.

-- 
Brian King
eServer Storage I/O
IBM Linux Technology Center

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/1] scsi: scsi inquiry timeout config option
  2005-10-03 21:31   ` Brian King
@ 2005-10-03 21:34     ` Randy.Dunlap
  2005-10-03 21:42       ` Brian King
  0 siblings, 1 reply; 9+ messages in thread
From: Randy.Dunlap @ 2005-10-03 21:34 UTC (permalink / raw)
  To: Brian King; +Cc: James Bottomley, SCSI Mailing List, linuxppc64-dev

On Mon, 3 Oct 2005, Brian King wrote:

> James Bottomley wrote:
> > On Mon, 2005-10-03 at 15:26 -0500, brking@us.ibm.com wrote:
> >
> >>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.
> >
> >
> > The inquiry timeout has already been changed a while ago to be a module
> > parameter (or kernel parameter) for this very case.  Why does it now
> > need to be a config option as well?
>
> So that when a distro goes off and builds a PPC64 install kernel,
> it can boot on one of these broken DVD-ROMs without requiring each
> distro to add special module options inside their initrd.

My reading on mailing lists is that distros prefer
module or kernel parameters more than they do kernel config
options (in general) because they are more dynamic -- it
allows them to build one kernel instead of many kernels
with various config options.

-- 
~Randy

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/1] scsi: scsi inquiry timeout config option
  2005-10-03 21:34     ` Randy.Dunlap
@ 2005-10-03 21:42       ` Brian King
  2005-10-03 21:47         ` Randy.Dunlap
  0 siblings, 1 reply; 9+ messages in thread
From: Brian King @ 2005-10-03 21:42 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: James Bottomley, linuxppc64-dev, SCSI Mailing List

Randy.Dunlap wrote:
> On Mon, 3 Oct 2005, Brian King wrote:
> 
> 
>>James Bottomley wrote:
>>
>>>On Mon, 2005-10-03 at 15:26 -0500, brking@us.ibm.com wrote:
>>>
>>>
>>>>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.
>>>
>>>
>>>The inquiry timeout has already been changed a while ago to be a module
>>>parameter (or kernel parameter) for this very case.  Why does it now
>>>need to be a config option as well?
>>
>>So that when a distro goes off and builds a PPC64 install kernel,
>>it can boot on one of these broken DVD-ROMs without requiring each
>>distro to add special module options inside their initrd.
> 
> 
> My reading on mailing lists is that distros prefer
> module or kernel parameters more than they do kernel config
> options (in general) because they are more dynamic -- it
> allows them to build one kernel instead of many kernels
> with various config options.

I agree with that statement, however.... Right now I am sitting with
an install ISO, trying to boot off this broken DVD-ROM, with scsi
compiled as a module in the install kernel, so I can't pass any
boot parameters to it in order to make it boot...

Additionally, this kernel config option does not decrease this dynamic
ability. The config option simply alters the default inquiry timeout.
If a module parm is passed at module load time, it will override the
default.


-- 
Brian King
eServer Storage I/O
IBM Linux Technology Center

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/1] scsi: scsi inquiry timeout config option
  2005-10-03 21:42       ` Brian King
@ 2005-10-03 21:47         ` Randy.Dunlap
  0 siblings, 0 replies; 9+ messages in thread
From: Randy.Dunlap @ 2005-10-03 21:47 UTC (permalink / raw)
  To: Brian King
  Cc: James Bottomley, linuxppc64-dev, Randy.Dunlap, SCSI Mailing List

On Mon, 3 Oct 2005, Brian King wrote:

> Randy.Dunlap wrote:
> > On Mon, 3 Oct 2005, Brian King wrote:
> >
> >
> >>James Bottomley wrote:
> >>
> >>>On Mon, 2005-10-03 at 15:26 -0500, brking@us.ibm.com wrote:
> >>>
> >>>
> >>>>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.
> >>>
> >>>
> >>>The inquiry timeout has already been changed a while ago to be a module
> >>>parameter (or kernel parameter) for this very case.  Why does it now
> >>>need to be a config option as well?
> >>
> >>So that when a distro goes off and builds a PPC64 install kernel,
> >>it can boot on one of these broken DVD-ROMs without requiring each
> >>distro to add special module options inside their initrd.
> >
> >
> > My reading on mailing lists is that distros prefer
> > module or kernel parameters more than they do kernel config
> > options (in general) because they are more dynamic -- it
> > allows them to build one kernel instead of many kernels
> > with various config options.
>
> I agree with that statement, however.... Right now I am sitting with
> an install ISO, trying to boot off this broken DVD-ROM, with scsi
> compiled as a module in the install kernel, so I can't pass any
> boot parameters to it in order to make it boot...

and you can't modify the module parameters (on the DVD)...
Yes, I've seen that kind of problem recently too (not the
same problem, however).

> Additionally, this kernel config option does not decrease this dynamic
> ability. The config option simply alters the default inquiry timeout.
> If a module parm is passed at module load time, it will override the
> default.

True.  and we have precedent(s) for some options living in
both .config and as kernel/module parameters/options.

-- 
~Randy

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/1] scsi: scsi inquiry timeout config option
  2005-10-03 20:26 [PATCH 1/1] scsi: scsi inquiry timeout config option brking
  2005-10-03 20:39 ` linas
  2005-10-03 21:01 ` James Bottomley
@ 2005-10-04 18:46 ` Christoph Hellwig
  2 siblings, 0 replies; 9+ messages in thread
From: Christoph Hellwig @ 2005-10-04 18:46 UTC (permalink / raw)
  To: brking; +Cc: James.Bottomley, linux-scsi, linuxppc64-dev

On Mon, Oct 03, 2005 at 03:26:30PM -0500, brking@us.ibm.com wrote:
> 
> 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.

This is really not something that should be a CONFIG_ symbol.
We have a perfectly fine working module option for it.


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2005-10-04 18:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-03 20:26 [PATCH 1/1] scsi: scsi inquiry timeout config option brking
2005-10-03 20:39 ` linas
2005-10-03 20:44   ` Brian King
2005-10-03 21:01 ` James Bottomley
2005-10-03 21:31   ` Brian King
2005-10-03 21:34     ` Randy.Dunlap
2005-10-03 21:42       ` Brian King
2005-10-03 21:47         ` Randy.Dunlap
2005-10-04 18:46 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).