Skip to contentSkip to conversation

2.6.4: disabling SCSI support not possible

DISCUSSION Olaf Zaplinski 9 participants 14 messages Apr 2, 2004 – Apr 6, 2004

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

Hi *,

I cannot disable SCSI completely in 2.6.4's 'menuconfig'.

Regards
Olaf

#1 lore raw
Quoted 3 lines · Olaf Zaplinski

Hi *,

I cannot disable SCSI completely in 2.6.4's 'menuconfig'.

In default config file there is activated something under USB, what depends on SCSI. Try to disable that first.

Grzegorz Kulewski

#2 lore raw
In reply to Olaf Zaplinski
Quoted 1 line · Olaf Zaplinski

I cannot disable SCSI completely in 2.6.4's 'menuconfig'.

I believe that some kernel components require SCSI to be useful and so force SCSI to be activated. One example that springs to mind is usb-storage.

#3 lore raw
Quoted 7 lines · Sean Neakums
Quoted 1 line · Olaf Zaplinski

I cannot disable SCSI completely in 2.6.4's 'menuconfig'.

I believe that some kernel components require SCSI to be useful and so force SCSI to be activated. One example that springs to mind is usb-storage.

usb-storage should depend on SCSI rather than forcing SCSI to be enabled.

Using 'select' is all very well for the case where the target configuration symbol is not user selectable, but in the case that it is, it leads to the confusion shown above.

Maybe USB_STORAGE help text should say that it needs SCSI support?

Therefore, I propose this patch:

drivers/usb/storage/Kconfig +4 -2
@@ -4,8 +4,7 @@
 
 config USB_STORAGE
 	tristate "USB Mass Storage support"
-	depends on USB
-	select SCSI
+	depends on USB && 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,
@@ -13,6 +12,9 @@ config USB_STORAGE
 	  similar devices. This driver may also be used for some cameras and
 	  card readers.
 
+	  Please select SCSI support before enabling USB Mass Storage
+	  support.
+
 	  To compile this driver as a module, choose M here: the
 	  module will be called usb-storage.
 
Signature · 4 lines
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                 2.6 Serial core
#4 lore raw

On Friday 02 April 2004 15:42, Russell King wrote:

Hi Russel,

Quoted 13 lines
drivers/usb/storage/Kconfig +1 -2
@@ -4,8 +4,7 @@
 
 config USB_STORAGE
 	tristate "USB Mass Storage support"
-	depends on USB
-	select SCSI
+	depends on USB && 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,

drivers/usb/storage/Kconfig config USB_STORAGE · line 19

Quoted 8 lines
drivers/usb/storage/Kconfig +3 -0
@@ -13,6 +12,9 @@ config USB_STORAGE
 	  similar devices. This driver may also be used for some cameras and
 	  card readers.
 
+	  Please select SCSI support before enabling USB Mass Storage
+	  support.
+
 	  To compile this driver as a module, choose M here: the
 	  module will be called usb-storage.

pretty useless if you do not see "USB Mass Storage support" config options due to disabled SCSI ;)

I'd suggest a comment, when SCSI is disabled, that USB Mass Storage is disabled unless you select SCSI. I tried to cook up a simple patch but it seems I don't know kbuild very well. The menu structure messed up after I did it.

ciao, Marc

#5 lore raw
In reply to Russell King
Quoted 11 lines · Russell King
Quoted 7 lines · Sean Neakums
Quoted 1 line · Olaf Zaplinski

I cannot disable SCSI completely in 2.6.4's 'menuconfig'.

I believe that some kernel components require SCSI to be useful and so force SCSI to be activated. One example that springs to mind is usb-storage.

usb-storage should depend on SCSI rather than forcing SCSI to be enabled.

No, this is the way it used to be, and it caused all kinds of problems in the past. It was switched to use 'select' on purpose, and should stay that way.

thanks,

greg k-h

#6 lore raw
Quoted 3 lines · Greg KH

No, this is the way it used to be, and it caused all kinds of problems in the past. It was switched to use 'select' on purpose, and should stay that way.

It's causing problems today by preventing people from being able to de-select SCSI for no obvious reason.

It is far less intuitive to know you have to turn off USB_STORAGE before you can turn off SCSI than to know that you have to turn on SCSI before you can turn on USB_STORAGE.

If you wish to keep it this way, could we either have:

(a) a note in the SCSI help text to say that the option is forced on by USB_STORAGE, so people know what to turn off.

or

(b) have kconfig tell you why you can't turn off the option.

Silently preventing options being turned off with no obvious reason is a pretty major misfeature.

Signature · 4 lines
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                 2.6 Serial core
#7 lore raw
Quoted 4 lines · Russell King

(b) have kconfig tell you why you can't turn off the option.

Silently preventing options being turned off with no obvious reason is a pretty major misfeature.

It's even worse than that; with USB_STORAGE enabled, CONFIG_SCSI doesn't even show an option selection box, so it's not even obvious that it _is_ an option, rather than a comment.

#8 lore raw
In reply to Russell King
Quoted 7 lines · Russell King
Quoted 3 lines · Greg KH

No, this is the way it used to be, and it caused all kinds of problems in the past. It was switched to use 'select' on purpose, and should stay that way.

It's causing problems today by preventing people from being able to de-select SCSI for no obvious reason.

Ok, you get people complaining either way. So no matter what people aren't happy :(

As Linus is the one who enabled this option for CONFIG_USB_STORAGE, I'm going to rule that it should stay the way it currently is.

thanks,

greg k-h

#9 lore raw
In reply to Russell King
Quoted 7 lines · Russell King
Quoted 3 lines · Greg KH

No, this is the way it used to be, and it caused all kinds of problems in the past. It was switched to use 'select' on purpose, and should stay that way.

Quoted 6 lines

It's causing problems today by preventing people from being able to de-select SCSI for no obvious reason.

It is far less intuitive to know you have to turn off USB_STORAGE before you can turn off SCSI than to know that you have to turn on SCSI before you can turn on USB_STORAGE.

Intuitive isn't the issue, if you can't figure out why you can't turn off SCSI, you leave it on, which you need to make USB storage work. If you're trying to make a small kernel you presumably would have turned off USB if you didn't want it. The other way, if you can turn on USB w/o SCSI, it won't work, and people thing Linux is broken.

The issue is that what we have works but it's not obvious why, vs. doesn't work and also isn't obvious why. Thank you, work by default is better.

Quoted 5 lines

If you wish to keep it this way, could we either have:

(a) a note in the SCSI help text to say that the option is forced on by USB_STORAGE, so people know what to turn off.

Chances are that most people wouldn't have USB on if they didn't want it, but there's no downside to doing this.

Quoted 4 lines

or

(b) have kconfig tell you why you can't turn off the option.

I thought that was what (a) did.

Quoted 3 lines

Silently preventing options being turned off with no obvious reason is a pretty major misfeature.

Compared to enabling USB storage with no hope of having it work? Adding user info is desirable, but making it easy, or even possible, to build a
non-working config is a lot more of a problem. You haven't compiled on
a slow machine lately, forcing config combinations which work is a benefit of kconfig.

If you want it broken you have to edit the config code. That's a good thing.

Signature · 3 lines
   -bill davidsen ([email protected])
"The secret to procrastination is to put things off until the
 last possible moment - but no longer"  -me
#10 lore raw
Quoted 5 lines · Bill Davidsen

Intuitive isn't the issue, if you can't figure out why you can't turn off SCSI, you leave it on, which you need to make USB storage work. If you're trying to make a small kernel you presumably would have turned off USB if you didn't want it. The other way, if you can turn on USB w/o SCSI, it won't work, and people thing Linux is broken.

When I hit it, I was trying to build a kernel for test purposes, so I didn't want all the drivers turned on. I found I couldn't turn off SCSI and continued anyway turning other things off. However, USB appears _after_ SCSI, you can not go through the configuration logically to turn off features. Moreover, you do not get any suggestion when attempting to turn SCSI off that you need to turn off USB.

Quoted 2 lines

Chances are that most people wouldn't have USB on if they didn't want it, but there's no downside to doing this.

The x86 default configuration has USB + USB Storage turned on. It makes it _non-trivial_ to turn SCSI off unless you have prior knowledge that you need to turn USB off before hand.

Quoted 3 lines
Quoted 1 line

(b) have kconfig tell you why you can't turn off the option.

I thought that was what (a) did.

No - the configuration system just doesn't let you turn SCSI off. No complaint, no warning, no nothing. It just won't change the symbol.

Quoted 8 lines
Quoted 2 lines

Silently preventing options being turned off with no obvious reason is a pretty major misfeature.

Compared to enabling USB storage with no hope of having it work? Adding user info is desirable, but making it easy, or even possible, to build a
non-working config is a lot more of a problem. You haven't compiled on
a slow machine lately, forcing config combinations which work is a benefit of kconfig.

Umm, you're talking to an ARM developer who builds some kernels natively. I suspect that your definition of "slow" is actually faster than my definition of the same.

Quoted 1 line

If you want it broken you have to edit the config code. That's a good thing.

Read what I'm saying. *Silently* preventing options being turned off with *no* *obvious* *reason* is a pretty major misfeature.

I hope the emphasis will highlight the problem more clearly.

Signature · 4 lines
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                 2.6 Serial core
#11 lore raw

On Tuesday 06 April 2004 10:42, Russell King wrote:

Hi,

Quoted 6 lines
Quoted 5 lines

Intuitive isn't the issue, if you can't figure out why you can't turn off SCSI, you leave it on, which you need to make USB storage work. If you're trying to make a small kernel you presumably would have turned off USB if you didn't want it. The other way, if you can turn on USB w/o SCSI, it won't work, and people thing Linux is broken.

Quoted 6 lines

When I hit it, I was trying to build a kernel for test purposes, so I didn't want all the drivers turned on. I found I couldn't turn off SCSI and continued anyway turning other things off. However, USB appears _after_ SCSI, you can not go through the configuration logically to turn off features. Moreover, you do not get any suggestion when attempting to turn SCSI off that you need to turn off USB.

may I propose the following two patches?

01_menu-Kconfig-cleanups-08-usb-menu-indent-fix.patch
Fix up indents in the USB Input menu

02_menu-Kconfig-cleanups-09-USB-vs-SCSI-fix.patch
Fix SCSI dependency for USB-Storage support.
- Rip out "select SCSI"
- Make a comment when SCSI is not selected

ciao, Marc

drivers/usb/input/Kconfig +6 -6
diff -Naurp linux-2.6.4-rc1/drivers/usb/input/Kconfig linux-2.6.4-rc1-modified/drivers/usb/input/Kconfig
@@ -29,7 +29,7 @@ comment "Input core support is needed fo
 config USB_HIDINPUT
 	bool "HID input layer support"
 	default y
-	depends on INPUT && USB_HID
+	depends on INPUT && USB && USB_HID
 	help
 	  Say Y here if you want to use a USB keyboard, mouse or joystick,
 	  or any other HID input device. You also need "Input core support", 
@@ -39,7 +39,7 @@ config USB_HIDINPUT
 
 config HID_FF
 	bool "Force feedback support (EXPERIMENTAL)"
-	depends on USB_HIDINPUT && EXPERIMENTAL
+	depends on USB && USB_HIDINPUT && EXPERIMENTAL
 	help
 	  Say Y here is you want force feedback support for a few HID devices.
 	  See below for a list of supported devices.
@@ -51,7 +51,7 @@ config HID_FF
 
 config HID_PID
 	bool "PID Devices (Microsoft Sidewinder Force Feedback 2)"
-	depends on HID_FF
+	depends on USB && HID_FF
 	help
 	  Say Y here if you have a PID-compliant joystick and wish to enable force
 	  feedback for it. The Microsoft Sidewinder Force Feedback 2 is one such
@@ -59,7 +59,7 @@ config HID_PID
 
 config LOGITECH_FF
 	bool "Logitech WingMan *3D support"
-	depends on HID_FF
+	depends on USB && HID_FF
 	help
 	  Say Y here if you have one of these devices:
 	  - Logitech WingMan Cordless RumblePad
@@ -70,7 +70,7 @@ config LOGITECH_FF
 
 config THRUSTMASTER_FF
 	bool "ThrustMaster FireStorm Dual Power 2 support (EXPERIMENTAL)"
-	depends on HID_FF && EXPERIMENTAL
+	depends on USB && HID_FF && EXPERIMENTAL
 	help
 	  Say Y here if you have a THRUSTMASTER FireStore Dual Power 2,
 	  and want to enable force feedback support for it.
@@ -79,7 +79,7 @@ config THRUSTMASTER_FF
 
 config USB_HIDDEV
 	bool "/dev/hiddev raw HID device support"
-	depends on USB_HID
+	depends on USB && USB_HID
 	help
 	  Say Y here if you want to support HID devices (from the USB
 	  specification standpoint) that aren't strictly user interface
drivers/usb/storage/Kconfig +4 -3
diff -Naurp linux-2.6.4-wolk2.4-fullkernel/drivers/usb/storage/Kconfig linux-2.6.4-wolk2.4-USB-stuff/drivers/usb/storage/Kconfig
@@ -2,10 +2,9 @@
 # USB Storage driver configuration
 #
 
-config USB_STORAGE
+menuconfig USB_STORAGE
 	tristate "USB Mass Storage support"
-	depends on USB
-	select SCSI
+	depends on USB && 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,
@@ -89,3 +88,5 @@ config USB_STORAGE_JUMPSHOT
 	  Say Y here to include additional code to support the Lexar Jumpshot
 	  USB CompactFlash reader.
 
+comment "SCSI support is needed for USB Storage support"
+	depends on USB && !SCSI
#12 lore raw

On Tuesday 06 April 2004 12:46, Marc-Christian Petersen wrote:

Hi again,

Quoted 4 lines

02_menu-Kconfig-cleanups-09-USB-vs-SCSI-fix.patch
Fix SCSI dependency for USB-Storage support.
- Rip out "select SCSI"
- Make a comment when SCSI is not selected

grmpf, change !SCSI to SCSI=n. Again attached.

ciao, Marc

drivers/usb/storage/Kconfig +4 -3
diff -Naurp linux-2.6.4-wolk2.4-fullkernel/drivers/usb/storage/Kconfig linux-2.6.4-wolk2.4-USB-stuff/drivers/usb/storage/Kconfig
@@ -2,10 +2,9 @@
 # USB Storage driver configuration
 #
 
-config USB_STORAGE
+menuconfig USB_STORAGE
 	tristate "USB Mass Storage support"
-	depends on USB
-	select SCSI
+	depends on USB && 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,
@@ -89,3 +88,5 @@ config USB_STORAGE_JUMPSHOT
 	  Say Y here to include additional code to support the Lexar Jumpshot
 	  USB CompactFlash reader.
 
+comment "SCSI support is needed for USB Storage support"
+	depends on USB && SCSI=n
#13 lore raw
In reply to Russell King
Quoted 2 lines · Russell King

usb-storage should depend on SCSI rather than forcing SCSI to be enabled.

Actually, it should "require" SCSI, but the kernel configuration logic does not support that.

Quoted 3 lines

Using 'select' is all very well for the case where the target configuration symbol is not user selectable, but in the case that it is, it leads to the confusion shown above.

Indeed. "select" is very useful for enabling options that cannot otherwise be enabled. However, it gets mis-applied in cases like this to address the "stupid user" problem. (see above re: missing "require") In fact, the only place I can forgive the use of select on user selectable options in within the input layer options -- select is used to force a valid usable configuration instead of letting someone compile a kernel without any keyboard support, BUT, it's still user tunable if "embedded" is enabled.

--Ricky

(see also: http://bk.troz.com:14690/linux-2.6-bk/user=jfbeam/[email protected]
for additional SELECT removals.)