public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] set CONFIG_SCSI_MULTI_LUN by default and update help
@ 2009-05-03 13:57 Éric Piel
  2009-05-03 14:57 ` James Bottomley
  0 siblings, 1 reply; 9+ messages in thread
From: Éric Piel @ 2009-05-03 13:57 UTC (permalink / raw)
  To: James.Bottomley, linux-scsi; +Cc: Alan Stern

Hello, 

Here is a patch against 2.6.30-rc4, but probably material for 2.6.31,
which should avoid a couple of people to have the same problem as me.

Eric
==

I had to set CONFIG_SCSI_MULTI_LUN to y in order to get my SE W595
working when plugging it as a mass storage. Looking at SCSI option to
get a phone behaving correctly was convoluted to say the
least. There are quite a few other reports about USB card readers
needing this option as well.

This patch improves the help text to make the use of the option more
obvious and also defaults it to Y. I couldn't find any explicit reports
of devices not working because of multiple LUNs probing, but only
reports of people would had heard of such reports. In addition, every
mainstream distro have this option activated, so it should definitely
not be too dangerous.

Signed-off-by: Eric Piel <eric.piel@tremplin-utc.net>
---
 drivers/scsi/Kconfig |   18 ++++++++----------
 1 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
index 8ed2990..1aa1d7d 100644
--- a/drivers/scsi/Kconfig
+++ b/drivers/scsi/Kconfig
@@ -191,20 +191,18 @@ config SCSI_ENCLOSURE
 	  it has an enclosure device.  Selecting this option will just allow
 	  certain enclosure conditions to be reported and is not required.
 
-comment "Some SCSI devices (e.g. CD jukebox) support multiple LUNs"
-	depends on SCSI
-
 config SCSI_MULTI_LUN
 	bool "Probe all LUNs on each SCSI device"
 	depends on SCSI
+	default y
 	help
-	  If you have a SCSI device that supports more than one LUN (Logical
-	  Unit Number), e.g. a CD jukebox, and only one LUN is detected, you
-	  can say Y here to force the SCSI driver to probe for multiple LUNs.
-	  A SCSI device with multiple LUNs acts logically like multiple SCSI
-	  devices. The vast majority of SCSI devices have only one LUN, and
-	  so most people can say N here. The max_luns boot/module parameter 
-	  allows to override this setting.
+	  Some devices support more than one LUN (Logical Unit Number) in order
+	  to allow access to several media, e.g. CD jukebox, USB card reader,
+	  mobile phone in mass storage mode. This option forces the kernel to
+	  probe for all LUNs by default. This setting can be overriden by
+	  max_luns boot/module parameter. You want to say Y here unless you
+	  have one of those rare devices which reacts in an unexpected way when
+	  probed for multiple LUNs.
 
 config SCSI_CONSTANTS
 	bool "Verbose SCSI error reporting (kernel size +=12K)"
-- 
1.6.2.4



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

* Re: [PATCH] set CONFIG_SCSI_MULTI_LUN by default and update help
  2009-05-03 13:57 [PATCH] set CONFIG_SCSI_MULTI_LUN by default and update help Éric Piel
@ 2009-05-03 14:57 ` James Bottomley
  2009-05-03 15:08   ` Éric Piel
                     ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: James Bottomley @ 2009-05-03 14:57 UTC (permalink / raw)
  To: Éric Piel; +Cc: linux-scsi, Alan Stern

On Sun, 2009-05-03 at 15:57 +0200, Éric Piel wrote:
> Hello, 
> 
> Here is a patch against 2.6.30-rc4, but probably material for 2.6.31,
> which should avoid a couple of people to have the same problem as me.
> 
> Eric
> ==
> 
> I had to set CONFIG_SCSI_MULTI_LUN to y in order to get my SE W595
> working when plugging it as a mass storage. Looking at SCSI option to
> get a phone behaving correctly was convoluted to say the
> least. There are quite a few other reports about USB card readers
> needing this option as well.
> 
> This patch improves the help text to make the use of the option more
> obvious and also defaults it to Y. I couldn't find any explicit reports
> of devices not working because of multiple LUNs probing, but only
> reports of people would had heard of such reports. In addition, every
> mainstream distro have this option activated, so it should definitely
> not be too dangerous.
> 
> Signed-off-by: Eric Piel <eric.piel@tremplin-utc.net>

Actually, I'd really rather not alter the default value of this setting.
Multi-lun is rapidly becoming obsolete: any modern devices conforming to
SCSI-3 use REPORT LUNS instead of doing LUN scanning, which gets us out
of the issue.  Conversely, the ancient devices which rely on correctly
setting this are more likely to get upset about any change in the
balance.

In your case, just add the changer's inquiry strings with a
BLIST_FORCELUN.

James


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] set CONFIG_SCSI_MULTI_LUN by default and update help
  2009-05-03 14:57 ` James Bottomley
@ 2009-05-03 15:08   ` Éric Piel
  2009-05-03 15:17     ` James Bottomley
  2009-05-03 15:11   ` Matthew Wilcox
  2009-05-04 10:43   ` [PATCH] Update wording of CONFIG_SCSI_MULTI_LUN help Éric Piel
  2 siblings, 1 reply; 9+ messages in thread
From: Éric Piel @ 2009-05-03 15:08 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-scsi, Alan Stern

James Bottomley schreef:
> On Sun, 2009-05-03 at 15:57 +0200, Éric Piel wrote:
:
> 
> Actually, I'd really rather not alter the default value of this setting.
> Multi-lun is rapidly becoming obsolete: any modern devices conforming to
> SCSI-3 use REPORT LUNS instead of doing LUN scanning, which gets us out
> of the issue.  Conversely, the ancient devices which rely on correctly
> setting this are more likely to get upset about any change in the
> balance.
Yes, I understand. Would like me to resend the patch without the change
on the default value. IMHO, it provides a better wording.

> 
> In your case, just add the changer's inquiry strings with a
> BLIST_FORCELUN.
Where, into the usb-storage driver? I guess there is no usb device which
can get confused by this, so it should work fine as well :-)

Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] set CONFIG_SCSI_MULTI_LUN by default and update help
  2009-05-03 14:57 ` James Bottomley
  2009-05-03 15:08   ` Éric Piel
@ 2009-05-03 15:11   ` Matthew Wilcox
  2009-05-03 15:21     ` James Bottomley
  2009-05-04 10:43   ` [PATCH] Update wording of CONFIG_SCSI_MULTI_LUN help Éric Piel
  2 siblings, 1 reply; 9+ messages in thread
From: Matthew Wilcox @ 2009-05-03 15:11 UTC (permalink / raw)
  To: James Bottomley; +Cc: ?ric Piel, linux-scsi, Alan Stern

On Sun, May 03, 2009 at 09:57:15AM -0500, James Bottomley wrote:
> Actually, I'd really rather not alter the default value of this setting.
> Multi-lun is rapidly becoming obsolete: any modern devices conforming to
> SCSI-3 use REPORT LUNS instead of doing LUN scanning, which gets us out
> of the issue.  Conversely, the ancient devices which rely on correctly
> setting this are more likely to get upset about any change in the
> balance.

Yes, but USB devices are prohibited from being SCSI-3 devices, so it's
not becoming obsolete.

> In your case, just add the changer's inquiry strings with a
> BLIST_FORCELUN.

I wonder if we should make USB devices set that by default?  What does
Windows do here?

-- 
Matthew Wilcox				Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."

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

* Re: [PATCH] set CONFIG_SCSI_MULTI_LUN by default and update help
  2009-05-03 15:08   ` Éric Piel
@ 2009-05-03 15:17     ` James Bottomley
  0 siblings, 0 replies; 9+ messages in thread
From: James Bottomley @ 2009-05-03 15:17 UTC (permalink / raw)
  To: Éric Piel; +Cc: linux-scsi, Alan Stern

On Sun, 2009-05-03 at 17:08 +0200, Éric Piel wrote:
> James Bottomley schreef:
> > On Sun, 2009-05-03 at 15:57 +0200, Éric Piel wrote:
> :
> > 
> > Actually, I'd really rather not alter the default value of this setting.
> > Multi-lun is rapidly becoming obsolete: any modern devices conforming to
> > SCSI-3 use REPORT LUNS instead of doing LUN scanning, which gets us out
> > of the issue.  Conversely, the ancient devices which rely on correctly
> > setting this are more likely to get upset about any change in the
> > balance.
> Yes, I understand. Would like me to resend the patch without the change
> on the default value. IMHO, it provides a better wording.

I'm not opposed in principle to the update ... however it might perhaps
need to point out that modern devices (conforming to SCSI-3 and up) will
ignore this setting.

This also brings up (again) the problem of USB lying about the SCSI
conformance level.  Your changer could well have reported SCSI-3 or
higher and be quite capable of doing a report lun scan, but the
scsiglue.c:216 fix to the scsi compliance level pushed it back down to
scsi-2 again.

> > In your case, just add the changer's inquiry strings with a
> > BLIST_FORCELUN.
> Where, into the usb-storage driver? I guess there is no usb device which
> can get confused by this, so it should work fine as well :-)

It's not in the usb driver, it's in the inquiry string blacklist table
in scsi_devinfo.c

James


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] set CONFIG_SCSI_MULTI_LUN by default and update help
  2009-05-03 15:11   ` Matthew Wilcox
@ 2009-05-03 15:21     ` James Bottomley
  2009-05-03 15:24       ` Matthew Wilcox
  0 siblings, 1 reply; 9+ messages in thread
From: James Bottomley @ 2009-05-03 15:21 UTC (permalink / raw)
  To: Matthew Wilcox; +Cc: ?ric Piel, linux-scsi, Alan Stern

On Sun, 2009-05-03 at 09:11 -0600, Matthew Wilcox wrote:
> On Sun, May 03, 2009 at 09:57:15AM -0500, James Bottomley wrote:
> > Actually, I'd really rather not alter the default value of this setting.
> > Multi-lun is rapidly becoming obsolete: any modern devices conforming to
> > SCSI-3 use REPORT LUNS instead of doing LUN scanning, which gets us out
> > of the issue.  Conversely, the ancient devices which rely on correctly
> > setting this are more likely to get upset about any change in the
> > balance.
> 
> Yes, but USB devices are prohibited from being SCSI-3 devices, so it's
> not becoming obsolete.

No they're not, there's nothing in the USB specs that say this.  UAS
will specifically require it.

The problem is we don't trust USB manufacturers with standards
compliance any further than they could spit a rat, so we assume when
they say they conform to SCSI-3 or above that they must have got it
wrong and push it back down to SCSI-2.

Because of this, no-one actually knows how many working SCSI-3 USB
devices we might have supported.

James



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

* Re: [PATCH] set CONFIG_SCSI_MULTI_LUN by default and update help
  2009-05-03 15:21     ` James Bottomley
@ 2009-05-03 15:24       ` Matthew Wilcox
  2009-05-03 18:37         ` Alan Stern
  0 siblings, 1 reply; 9+ messages in thread
From: Matthew Wilcox @ 2009-05-03 15:24 UTC (permalink / raw)
  To: James Bottomley; +Cc: ?ric Piel, linux-scsi, Alan Stern

On Sun, May 03, 2009 at 10:21:08AM -0500, James Bottomley wrote:
> On Sun, 2009-05-03 at 09:11 -0600, Matthew Wilcox wrote:
> > On Sun, May 03, 2009 at 09:57:15AM -0500, James Bottomley wrote:
> > > Actually, I'd really rather not alter the default value of this setting.
> > > Multi-lun is rapidly becoming obsolete: any modern devices conforming to
> > > SCSI-3 use REPORT LUNS instead of doing LUN scanning, which gets us out
> > > of the issue.  Conversely, the ancient devices which rely on correctly
> > > setting this are more likely to get upset about any change in the
> > > balance.
> > 
> > Yes, but USB devices are prohibited from being SCSI-3 devices, so it's
> > not becoming obsolete.
> 
> No they're not, there's nothing in the USB specs that say this.  UAS
> will specifically require it.

I didn't mean "prohibited by the USB spec", I meant "prohibited by Linux",
for the exact reason you say below.

> The problem is we don't trust USB manufacturers with standards
> compliance any further than they could spit a rat, so we assume when
> they say they conform to SCSI-3 or above that they must have got it
> wrong and push it back down to SCSI-2.
> 
> Because of this, no-one actually knows how many working SCSI-3 USB
> devices we might have supported.

This is true.  Suggestions for a better way to handle USB devices ... ?

-- 
Matthew Wilcox				Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."

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

* Re: [PATCH] set CONFIG_SCSI_MULTI_LUN by default and update help
  2009-05-03 15:24       ` Matthew Wilcox
@ 2009-05-03 18:37         ` Alan Stern
  0 siblings, 0 replies; 9+ messages in thread
From: Alan Stern @ 2009-05-03 18:37 UTC (permalink / raw)
  To: Matthew Wilcox
  Cc: James Bottomley, ?ric Piel, SCSI development list,
	USB Storage list

On Sun, 3 May 2009, Matthew Wilcox wrote:

> > The problem is we don't trust USB manufacturers with standards
> > compliance any further than they could spit a rat, so we assume when
> > they say they conform to SCSI-3 or above that they must have got it
> > wrong and push it back down to SCSI-2.

Indeed, we have run across a number of USB devices which claim to be 
SCSI-3 compliant and then crash when they receive a REPORT LUNS 
command.

> > Because of this, no-one actually knows how many working SCSI-3 USB
> > devices we might have supported.
> 
> This is true.  Suggestions for a better way to handle USB devices ... ?

Is there any reason usb-storage shouldn't set the FORCELUNS flag for 
all devices not known to have only one LUN?

Eric is trying to address two separate issues.  One is bad or outdated 
wording of the Kconfig help text for SCSI_MULTI_LUN.  The other is the 
fact that some USB devices can't be used to their full extent when the 
option isn't set, and people rolling their own configs (as opposed to 
using a distro kernel) tend not to enable it.  Maybe changing the help 
text will be enough for both problems.

As for future treatment of USB devices claiming SCSI-3 compliance (or 
above), I don't know.  Keep the field unchanged but set a flag to rule 
out the use of REPORT LUNS?

Alan Stern


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

* [PATCH] Update wording of CONFIG_SCSI_MULTI_LUN help
  2009-05-03 14:57 ` James Bottomley
  2009-05-03 15:08   ` Éric Piel
  2009-05-03 15:11   ` Matthew Wilcox
@ 2009-05-04 10:43   ` Éric Piel
  2 siblings, 0 replies; 9+ messages in thread
From: Éric Piel @ 2009-05-04 10:43 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-scsi, Alan Stern, matthew, Matthew Dharm

Hello,
This is an updated version of the previous patch. It now leaves the
default option value to N, and a note explaining that SCSI-3+ devices
are not affected was added.

As it only makes the options more understandable without changing the
behaviour, it could be considered for 2.6.30, but I let you decide :-)

Eric

==
I had to set CONFIG_SCSI_MULTI_LUN to y in order to get my SE W595
working when plugging it as a mass storage. Looking at SCSI option to
get a phone behaving correctly was convoluted to say the least. There
are quite a few other reports about USB card readers needing this option
as well. This patch improves the help text to make the use of the option
more obvious.

Signed-off-by: Eric Piel <eric.piel@tremplin-utc.net>
---
 drivers/scsi/Kconfig |   19 +++++++++----------
 1 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
index 8ed2990..06bd7e3 100644
--- a/drivers/scsi/Kconfig
+++ b/drivers/scsi/Kconfig
@@ -191,20 +191,19 @@ config SCSI_ENCLOSURE
 	  it has an enclosure device.  Selecting this option will just allow
 	  certain enclosure conditions to be reported and is not required.
 
-comment "Some SCSI devices (e.g. CD jukebox) support multiple LUNs"
-	depends on SCSI
-
 config SCSI_MULTI_LUN
 	bool "Probe all LUNs on each SCSI device"
 	depends on SCSI
 	help
-	  If you have a SCSI device that supports more than one LUN (Logical
-	  Unit Number), e.g. a CD jukebox, and only one LUN is detected, you
-	  can say Y here to force the SCSI driver to probe for multiple LUNs.
-	  A SCSI device with multiple LUNs acts logically like multiple SCSI
-	  devices. The vast majority of SCSI devices have only one LUN, and
-	  so most people can say N here. The max_luns boot/module parameter 
-	  allows to override this setting.
+	  Some devices support more than one LUN (Logical Unit Number) in order
+	  to allow access to several media, e.g. CD jukebox, USB card reader,
+	  mobile phone in mass storage mode. This option forces the kernel to
+	  probe for all LUNs by default. This setting can be overriden by
+	  max_luns boot/module parameter. Note that this option does not affect
+	  devices conforming to SCSI-3 or higher as they can explicitely report
+	  their number of LUNs. It is safe to say Y here unless you have one of
+	  those rare devices which reacts in an unexpected way when probed for
+	  multiple LUNs.
 
 config SCSI_CONSTANTS
 	bool "Verbose SCSI error reporting (kernel size +=12K)"
-- 
1.6.2.4


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

end of thread, other threads:[~2009-05-04 10:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-03 13:57 [PATCH] set CONFIG_SCSI_MULTI_LUN by default and update help Éric Piel
2009-05-03 14:57 ` James Bottomley
2009-05-03 15:08   ` Éric Piel
2009-05-03 15:17     ` James Bottomley
2009-05-03 15:11   ` Matthew Wilcox
2009-05-03 15:21     ` James Bottomley
2009-05-03 15:24       ` Matthew Wilcox
2009-05-03 18:37         ` Alan Stern
2009-05-04 10:43   ` [PATCH] Update wording of CONFIG_SCSI_MULTI_LUN help Éric Piel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox