Skip to contentSkip to conversation

usb-storage should enable scsi disk in Kconfig

PATCH Applied Stelian Pop 6 participants 10 messages Nov 19, 2004 – Nov 29, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb-storage should enable scsi disk in Kconfig

As $subject says, usb-storage storage should automatically enable scsi disk support in Kconfig.

Please apply.

Stelian.

===== drivers/usb/storage/Kconfig 1.9 vs edited =====

drivers/usb/storage/Kconfig +1 -0
@@ -6,6 +6,7 @@
 	tristate "USB Mass Storage support"
 	depends on USB
 	select SCSI
+	select BLK_DEV_SD
 	---help---
 	  Say Y here if you want to connect USB mass storage devices to your
 	  computer's USB port. This is the driver you need for USB floppy drives,
Signature · 1 line
Stelian Pop <[email protected]>
#1 lore raw
Quoted 4 lines · Stelian Pop

As $subject says, usb-storage storage should automatically enable scsi disk support in Kconfig.

Please apply.

No, it shouldn't. There's lots of usb storage devices that don't use sd, as there are lots of SPI/FC/etc.. devices.

#2 lore raw
Quoted 8 lines · Christoph Hellwig
Quoted 4 lines · Stelian Pop

As $subject says, usb-storage storage should automatically enable scsi disk support in Kconfig.

Please apply.

No, it shouldn't. There's lots of usb storage devices that don't use sd, as there are lots of SPI/FC/etc.. devices.

Indeed, I should have checked more carefully. My bad.

Still, it is not obvious that one should go into a completly different config section and manually enable sd support, and I have been bitten by this more than one time.

Maybe we should add, just below the 'USB storage' Kconfig option another one, let's say 'SCSI disk based USB storage support', which documentation would talk about 'usb keys, memory stick readers, USB floppy drives etc', which should just be a dummy option selecting BLK_DEV_SD ?

Or perhaps we should add something along the Debian's dpkg 'suggests' rule to Kconfig ? :)

Stelian.

Signature · 1 line
Stelian Pop <[email protected]>
#3 lore raw
Quoted 17 lines · Stelian Pop
Quoted 8 lines · Christoph Hellwig
Quoted 4 lines · Stelian Pop

As $subject says, usb-storage storage should automatically enable scsi disk support in Kconfig.

Please apply.

No, it shouldn't. There's lots of usb storage devices that don't use sd, as there are lots of SPI/FC/etc.. devices.

Indeed, I should have checked more carefully. My bad.

Still, it is not obvious that one should go into a completly different config section and manually enable sd support, and I have been bitten by this more than one time.

Quoted 7 lines

Maybe we should add, just below the 'USB storage' Kconfig option another one, let's say 'SCSI disk based USB storage support', which documentation would talk about 'usb keys, memory stick readers, USB floppy drives etc', which should just be a dummy option selecting BLK_DEV_SD ?

Or perhaps we should add something along the Debian's dpkg 'suggests' rule to Kconfig ? :)

I get enough e-mail on this topic that we should do something about it. We need some sort of 'suggests' rule, or at least some sort of message to the user to tell them to enable the high-level drivers.

Matt

Signature · 6 lines
Matthew Dharm                              Home: [email protected] 
Maintainer, Linux USB Mass Storage Driver

What, are you one of those Microsoft-bashing Linux freaks?
					-- Customer to Greg
User Friendly, 2/10/1999
#4 lore raw
Quoted 26 lines · Matthew Dharm
Quoted 24 lines · Stelian Pop
Quoted 9 lines · Christoph Hellwig
Quoted 4 lines · Stelian Pop

As $subject says, usb-storage storage should automatically enable scsi disk support in Kconfig.

Please apply.

No, it shouldn't. There's lots of usb storage devices that don't use sd, as there are lots of SPI/FC/etc.. devices.

Indeed, I should have checked more carefully. My bad.

Still, it is not obvious that one should go into a completly different config section and manually enable sd support, and I have been bitten by this more than one time.

Maybe we should add, just below the 'USB storage' Kconfig option another one, let's say 'SCSI disk based USB storage support', which documentation would talk about 'usb keys, memory stick readers, USB floppy drives etc', which should just be a dummy option selecting BLK_DEV_SD ?

Quoted 7 lines
Quoted 2 lines

Or perhaps we should add something along the Debian's dpkg 'suggests' rule to Kconfig ? :)

I get enough e-mail on this topic that we should do something about it. We need some sort of 'suggests' rule, or at least some sort of message to the user to tell them to enable the high-level drivers.

Until 'suggests' is available, does this help any? It's tough getting people to read Help messages though.

Add comment/NOTE that USB_STORAGE probably needs BLK_DEV_SD also. Add a few device types to help text and reformat it.

diffstat:=

 drivers/usb/storage/Kconfig |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)
drivers/usb/storage/Kconfig renamed from drivers/usb/storage/Kconfig~usb_comment +11 -4
diff -Naurp ./drivers/usb/storage/Kconfig~usb_comment ./drivers/usb/storage/Kconfig
@@ -2,16 +2,23 @@
 # USB Storage driver configuration
 #
 
+comment "NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information"
+
 config USB_STORAGE
 	tristate "USB Mass Storage support"
 	depends on USB
 	select SCSI
 	---help---
 	  Say Y here if you want to connect USB mass storage devices to your
-	  computer's USB port. This is the driver you need for USB floppy drives,
-	  USB hard disks, USB tape drives and USB CD-ROMs, along with
-	  similar devices. This driver may also be used for some cameras and
-	  card readers.
+	  computer's USB port. This is the driver you need for USB
+	  floppy drives, USB hard disks, USB tape drives, USB CD-ROMs,
+	  USB flash devices, and memory sticks, along with
+	  similar devices. This driver may also be used for some cameras
+	  and card readers.
+
+	  This option 'selects' (turns on, enables) 'SCSI', but you
+	  probably also need 'SCSI device support: SCSI disk support'
+	  (BLK_DEV_SD) for most USB storage devices.
 
 	  To compile this driver as a module, choose M here: the
 	  module will be called usb-storage.
#5 lore raw
Quoted 7 lines · Randy.Dunlap
Quoted 6 lines
Quoted 6 lines
Quoted 1 line · Stelian Pop

Maybe we should add, just below the 'USB storage' Kconfig option another one, let's say 'SCSI disk based USB storage support', which documentation would talk about 'usb keys, memory stick readers, USB floppy drives etc', which should just be a dummy option selecting BLK_DEV_SD ?

Quoted 5 lines

Until 'suggests' is available, does this help any? It's tough getting people to read Help messages though.

Add comment/NOTE that USB_STORAGE probably needs BLK_DEV_SD also. Add a few device types to help text and reformat it.

Isn't my above suggestion even better ? A separate config option is much more visible IMHO...

Stelian.

Signature · 1 line
Stelian Pop <[email protected]>    
#6 lore raw
Quoted 14 lines · Stelian Pop
Quoted 11 lines · Randy.Dunlap
Quoted 6 lines
Quoted 6 lines
Quoted 1 line · Stelian Pop

Maybe we should add, just below the 'USB storage' Kconfig option another one, let's say 'SCSI disk based USB storage support', which documentation would talk about 'usb keys, memory stick readers, USB floppy drives etc', which should just be a dummy option selecting BLK_DEV_SD ?

Until 'suggests' is available, does this help any? It's tough getting people to read Help messages though.

Quoted 6 lines
Quoted 2 lines

Add comment/NOTE that USB_STORAGE probably needs BLK_DEV_SD also. Add a few device types to help text and reformat it.

Isn't my above suggestion even better ? A separate config option is much more visible IMHO...

Sounds good, as long as we don't mind the same option being settable in multiple places. Did you submit a patch?

Signature · 1 line
~Randy
#7 lore raw
Quoted 15 lines · Randy.Dunlap
Quoted 15 lines
Quoted 13 lines
Quoted 6 lines
Quoted 6 lines

Maybe we should add, just below the 'USB storage' Kconfig option another one, let's say 'SCSI disk based USB storage support', which documentation
would talk about 'usb keys, memory stick readers, USB floppy drives etc',
which should just be a dummy option selecting BLK_DEV_SD ?

Until 'suggests' is available, does this help any? It's tough getting people to read Help messages though.

Add comment/NOTE that USB_STORAGE probably needs BLK_DEV_SD also. Add a few device types to help text and reformat it.

Quoted 5 lines
Quoted 2 lines

Isn't my above suggestion even better ? A separate config option is much more visible IMHO...

Sounds good, as long as we don't mind the same option being settable in multiple places. Did you submit a patch?

Nope, I was waiting for the discussion to settle.

But here it is:

===== drivers/usb/storage/Kconfig 1.9 vs edited =====

drivers/usb/storage/Kconfig +10 -0
@@ -45,6 +45,16 @@
 	  If you say N here, the kernel will assume that all disk-like USB
 	  devices are write-enabled.
 
+config USB_STORAGE_SD
+	bool "USB Mass Storage SCSI-like disks"
+	depends on USB_STORAGE
+	select BLK_DEV_SD
+	help
+	  Say Y here if you want to enable support for SCSI-like USB
+	  connected disks. These are the most used USB Mass Storage
+	  devices, and include USB keys, USB floppy drives, most USB
+	  flash memory readers, some USB photo cameras etc.
+
 config USB_STORAGE_DATAFAB
 	bool "Datafab Compact Flash Reader support (EXPERIMENTAL)"
 	depends on USB_STORAGE && EXPERIMENTAL
Signature · 1 line
Stelian Pop <[email protected]>    
#8 lore raw
In reply to Randy.Dunlap

hoi :)

Quoted 2 lines · Randy.Dunlap

Until 'suggests' is available, does this help any? It's tough getting people to read Help messages though.

perhaps the following is enough?
SCSI is auto-enabled by USB_STORAGE. We should enable BLK_DEV_SD by default in this case but we should leave the option to turn it off.

Index: drivers/scsi/Kconfig
===================================================================
RCS file: /home/inf3/mnwaitz/src/linux-cvs/linux-2.5/drivers/scsi/Kconfig,v retrieving revision 1.69

scsi/Kconfig +1 -0
diff -u -p -r1.69 Kconfig
@@ -38,6 +38,7 @@ comment "SCSI support type (disk, tape, 
 config BLK_DEV_SD
 	tristate "SCSI disk support"
 	depends on SCSI
+	default m
 	---help---
 	  If you want to use SCSI hard disks, Fibre Channel disks,
 	  USB storage or the SCSI or parallel port version of
Signature · 1 line
Martin Waitz
Applied
#9 lore raw
In reply to Randy.Dunlap
Quoted 8 lines · Randy.Dunlap

Until 'suggests' is available, does this help any? It's tough getting people to read Help messages though.

Add comment/NOTE that USB_STORAGE probably needs BLK_DEV_SD also. Add a few device types to help text and reformat it.

Applied, thanks.

greg k-h