USB Storage Config patch for 2.4.17 and 2.5.1
PATCH 1/1 USB Storage Config patch for 2.4.17 and 2.5.1
This is a pretty trivial patch, but it fixes something kind of annoying.
USB Storage does not show up in the config menu if SCSI is not enabled.
My laptop is the only place i ever use USB. I would always disable SCSI because I don't have any SCSI devices for my laptop.
Then I tried to figure out why my USB floppy drive would never work...
The following patch modifies the config to display a "You need to enable SCSI for USB Storage" message if SCSI is not enabled. (Using the exact phrasing (and code) from the USB multimedia message.)
Here is the patch. It has been tested for 2.4.17 and 2.5.1. It would have been shorter, but i added indenting to make the code look consistant.) Hopefully linewrap does not hose this.
--------------- use boxknife on monitor here------------------
usb/Config.in +0 -0
@@ -32,15 +32,19 @@ comment 'USB Device Class drivers' dep_tristate ' USB Audio support' CONFIG_USB_AUDIO $CONFIG_USB $CONFIG_SOUND dep_tristate ' USB Bluetooth support (EXPERIMENTAL)' CONFIG_USB_BLUETOOTH
$CONFIG_USB $CONFIG_EXPERIMENTAL
-dep_tristate ' USB Mass Storage support' CONFIG_USB_STORAGE $CONFIG_USB $CONFIG_SCSI
- dep_mbool ' USB Mass Storage verbose debug' CONFIG_USB_STORAGE_DEBUG
$CONFIG_USB_STORAGE
- dep_mbool ' Datafab MDCFE-B Compact Flash Reader support'CONFIG_USB_STORAGE_DATAFAB $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
- dep_mbool ' Freecom USB/ATAPI Bridge support'CONFIG_USB_STORAGE_FREECOM $CONFIG_USB_STORAGE
- dep_mbool ' ISD-200 USB/ATA Bridge support' CONFIG_USB_STORAGE_ISD200
$CONFIG_USB_STORAGE
- dep_mbool ' Microtech CompactFlash/SmartMedia support'CONFIG_USB_STORAGE_DPCM $CONFIG_USB_STORAGE
- dep_mbool ' HP CD-Writer 82xx support' CONFIG_USB_STORAGE_HP8200e
$CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
- dep_mbool ' SanDisk SDDR-09 (and other SmartMedia) support'CONFIG_USB_STORAGE_SDDR09 $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
- dep_mbool ' Lexar Jumpshot Compact Flash Reader'CONFIG_USB_STORAGE_JUMPSHOT $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL +if [ "$CONFIG_SCSI" = "n" ]; then
+ comment ' SCSI support is needed for USB Storage'
+else
+ dep_tristate ' USB Mass Storage support' CONFIG_USB_STORAGE $CONFIG_USB
$CONFIG_SCSI
+ dep_mbool ' USB Mass Storage verbose debug'CONFIG_USB_STORAGE_DEBUG $CONFIG_USB_STORAGE
+ dep_mbool ' Datafab MDCFE-B Compact Flash Reader support'CONFIG_USB_STORAGE_DATAFAB $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
+ dep_mbool ' Freecom USB/ATAPI Bridge support'CONFIG_USB_STORAGE_FREECOM $CONFIG_USB_STORAGE
+ dep_mbool ' ISD-200 USB/ATA Bridge support'CONFIG_USB_STORAGE_ISD200 $CONFIG_USB_STORAGE
+ dep_mbool ' Microtech CompactFlash/SmartMedia support'CONFIG_USB_STORAGE_DPCM $CONFIG_USB_STORAGE
+ dep_mbool ' HP CD-Writer 82xx support' CONFIG_USB_STORAGE_HP8200e
$CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
+ dep_mbool ' SanDisk SDDR-09 (and other SmartMedia) support'CONFIG_USB_STORAGE_SDDR09 $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
+ dep_mbool ' Lexar Jumpshot Compact Flash Reader'CONFIG_USB_STORAGE_JUMPSHOT $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL +fi
dep_tristate ' USB Modem (CDC ACM) support' CONFIG_USB_ACM $CONFIG_USB dep_tristate ' USB Printer support' CONFIG_USB_PRINTER $CONFIG_USB
Quoted 4 lines · Alan
Here is the patch. It has been tested for 2.4.17 and 2.5.1. It would have been shorter, but i added indenting to make the code look consistant.) Hopefully linewrap does not hose this.
linewrap hosed it :)
Please try it again, and you only need to send it to me and the mailing list, not all of the people in the Cc: that you originally listed.
thanks,
greg k-h
Quoted 6 lines · you
Quoted 3 lines · Alan
Here is the patch. It has been tested for 2.4.17 and 2.5.1. It would have been shorter, but i added indenting to make the code look consistant.) Hopefully linewrap does not hose this.
linewrap hosed it :)
I thought it would. (The submissions docs make all sorts of nasty noises about posting attachments to the list. I guess I will have to do it anyways...)
Quoted 2 lines
Please try it again, and you only need to send it to me and the mailing list, not all of the people in the Cc: that you originally listed.
I was going to include you on the Cc: list as well. Right after I hit send. D'oh!
Here is the patch attached. Tested on 2.4.17 and 2.5.1. (Needs a version for the new 2.5.x config structure, but that should be trivial.)
BTW, this was written during the PLUG meeting last night. (Which you missed.) ]:>
usb/Config.in +13 -9
@@ -32,15 +32,19 @@ comment 'USB Device Class drivers' dep_tristate ' USB Audio support' CONFIG_USB_AUDIO $CONFIG_USB $CONFIG_SOUND dep_tristate ' USB Bluetooth support (EXPERIMENTAL)' CONFIG_USB_BLUETOOTH $CONFIG_USB $CONFIG_EXPERIMENTAL -dep_tristate ' USB Mass Storage support' CONFIG_USB_STORAGE $CONFIG_USB $CONFIG_SCSI - dep_mbool ' USB Mass Storage verbose debug' CONFIG_USB_STORAGE_DEBUG $CONFIG_USB_STORAGE - dep_mbool ' Datafab MDCFE-B Compact Flash Reader support' CONFIG_USB_STORAGE_DATAFAB $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL - dep_mbool ' Freecom USB/ATAPI Bridge support' CONFIG_USB_STORAGE_FREECOM $CONFIG_USB_STORAGE - dep_mbool ' ISD-200 USB/ATA Bridge support' CONFIG_USB_STORAGE_ISD200 $CONFIG_USB_STORAGE - dep_mbool ' Microtech CompactFlash/SmartMedia support' CONFIG_USB_STORAGE_DPCM $CONFIG_USB_STORAGE - dep_mbool ' HP CD-Writer 82xx support' CONFIG_USB_STORAGE_HP8200e $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL - dep_mbool ' SanDisk SDDR-09 (and other SmartMedia) support' CONFIG_USB_STORAGE_SDDR09 $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL - dep_mbool ' Lexar Jumpshot Compact Flash Reader' CONFIG_USB_STORAGE_JUMPSHOT $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL +if [ "$CONFIG_SCSI" = "n" ]; then + comment ' SCSI support is needed for USB Storage' +else + dep_tristate ' USB Mass Storage support' CONFIG_USB_STORAGE $CONFIG_USB $CONFIG_SCSI + dep_mbool ' USB Mass Storage verbose debug' CONFIG_USB_STORAGE_DEBUG $CONFIG_USB_STORAGE + dep_mbool ' Datafab MDCFE-B Compact Flash Reader support' CONFIG_USB_STORAGE_DATAFAB $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL + dep_mbool ' Freecom USB/ATAPI Bridge support' CONFIG_USB_STORAGE_FREECOM $CONFIG_USB_STORAGE + dep_mbool ' ISD-200 USB/ATA Bridge support' CONFIG_USB_STORAGE_ISD200 $CONFIG_USB_STORAGE + dep_mbool ' Microtech CompactFlash/SmartMedia support' CONFIG_USB_STORAGE_DPCM $CONFIG_USB_STORAGE + dep_mbool ' HP CD-Writer 82xx support' CONFIG_USB_STORAGE_HP8200e $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL + dep_mbool ' SanDisk SDDR-09 (and other SmartMedia) support' CONFIG_USB_STORAGE_SDDR09 $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL + dep_mbool ' Lexar Jumpshot Compact Flash Reader' CONFIG_USB_STORAGE_JUMPSHOT $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL +fi dep_tristate ' USB Modem (CDC ACM) support' CONFIG_USB_ACM $CONFIG_USB dep_tristate ' USB Printer support' CONFIG_USB_PRINTER $CONFIG_USB
Quoted 3 lines · Alan
Here is the patch attached. Tested on 2.4.17 and 2.5.1. (Needs a version for the new 2.5.x config structure, but that should be trivial.)
Thanks, I've applied just a portion of the patch (no need in indenting the usb-storage options, see
http://linuxusb.bitkeeper.com:8088/usb-2.4/[email protected][email protected]
and
http://linuxusb.bitkeeper.com:8088/usb-2.5/[email protected][email protected]
for the end result) to my 2.4 and 2.5 trees. I'll forward them on the the proper kernel maintainers.
Quoted 1 line
BTW, this was written during the PLUG meeting last night. (Which you missed.)
Ah, must have been another boring meeting if you were writing kernel config patches during it :)
thanks,
greg k-h
Quoted 11 lines · Greg KH
Quoted 2 lines · Alan
Here is the patch attached. Tested on 2.4.17 and 2.5.1. (Needs a version for the new 2.5.x config structure, but that should be trivial.)
Thanks, I've applied just a portion of the patch (no need in indenting the usb-storage options, see
http://linuxusb.bitkeeper.com:8088/usb-2.4/[email protected][email protected]
and
http://linuxusb.bitkeeper.com:8088/usb-2.5/[email protected][email protected]
for the end result) to my 2.4 and 2.5 trees. I'll forward them on the the proper kernel maintainers.
Cool. Sorry it took so long to get it to you. Just distracted by other things. (The patch was quick. Took less than 15 minutes to create and test. Remembering to do it was the hard part. ]:> )
Quoted 5 lines
Quoted 2 lines
BTW, this was written during the PLUG meeting last night. (Which you missed.)
Ah, must have been another boring meeting if you were writing kernel config patches during it :)
Actually it was a very good meeting. (Randal Schwartz was speaking on the future of Perl.) I wrote it during the "history of Perl" section, since I already knew that part. (Don't ask. A messy story involving mailing list maintence over a 28k connection.) I am waiting to write the security exploits for part of it if they actually do some of the things he spoke of in Perl 6. (User modifiable core code. Mmmm!)
Besides, some people only attend the meetings for the beer and/or cider afterwards...