All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: Greg KH <greg@kroah.com>
Cc: mdharm-usb@one-eyed-alien.net, zaitcev@yahoo.com,
	linux-usb-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org
Subject: RFC: [2.6 patch] let BLK_DEV_UB depend on USB_STORAGE=n
Date: Thu, 23 Dec 2004 03:40:31 +0100	[thread overview]
Message-ID: <20041223024031.GO5217@stusta.de> (raw)
In-Reply-To: <20041220003146.GB11358@kroah.com>

On Sun, Dec 19, 2004 at 04:31:46PM -0800, Greg KH wrote:
> On Mon, Dec 20, 2004 at 01:16:44AM +0100, Adrian Bunk wrote:
> > I've already seen people crippling their usb-storage driver with 
> > enabling BLK_DEV_UB - and I doubt the warning in the help text added 
> > after 2.6.9 will fix all such problems.
> > 
> > Is there except for kernel size any good reason for using BLK_DEV_UB 
> > instead of USB_STORAGE?
> 
> You don't want to use the scsi layer?  You like the stability of it at
> times?  :)
> 
> > If not, I'd suggest the patch below to let BLK_DEV_UB depend
> > on EMBEDDED.
> 
> No, it's good for non-embedded boxes too.


My current understanding is:
- BLK_DEV_UB supports a subset of what USB_STORAGE can support
- for an average user, there's no reason to enable BLK_DEV_UB
- if you really know what you are doing, there might be several reasons
  why you might want to use BLK_DEV_UB


What about the patch below to let BLK_DEV_UB depend on USB_STORAGE=n?

If you really know what you are doing, you'll also know that you have to
set USB_STORAGE=n before you can enable BLK_DEV_UB.


diffstat output:
 drivers/block/Kconfig              |    2 +-
 drivers/usb/storage/unusual_devs.h |    2 --
 drivers/usb/storage/usb.c          |    4 ----
 3 files changed, 1 insertion(+), 7 deletions(-)


Signed-off-by: Adrian Bunk <bunk@stusta.de>

--- linux-2.6.10-rc3-mm1-full/drivers/block/Kconfig.old	2004-12-20 00:52:22.000000000 +0100
+++ linux-2.6.10-rc3-mm1-full/drivers/block/Kconfig	2004-12-23 03:09:14.000000000 +0100
@@ -303,7 +303,7 @@
 
 config BLK_DEV_UB
 	tristate "Low Performance USB Block driver"
-	depends on USB
+	depends on USB && USB_STORAGE=n
 	help
 	  This driver supports certain USB attached storage devices
 	  such as flash keys.
--- linux-2.6.10-rc3-mm1-full/drivers/usb/storage/unusual_devs.h.old	2004-12-23 03:09:42.000000000 +0100
+++ linux-2.6.10-rc3-mm1-full/drivers/usb/storage/unusual_devs.h	2004-12-23 03:09:53.000000000 +0100
@@ -549,13 +549,11 @@
 		US_SC_SCSI, US_PR_CB, NULL,
 		US_FL_SINGLE_LUN ),
 
-#if !defined(CONFIG_BLK_DEV_UB) && !defined(CONFIG_BLK_DEV_UB_MODULE)
 UNUSUAL_DEV(  0x0781, 0x0002, 0x0009, 0x0009, 
 		"Sandisk",
 		"ImageMate SDDR-31",
 		US_SC_DEVICE, US_PR_DEVICE, NULL,
 		US_FL_IGNORE_SER ),
-#endif
 
 UNUSUAL_DEV(  0x0781, 0x0100, 0x0100, 0x0100,
 		"Sandisk",
--- linux-2.6.10-rc3-mm1-full/drivers/usb/storage/usb.c.old	2004-12-23 03:10:00.000000000 +0100
+++ linux-2.6.10-rc3-mm1-full/drivers/usb/storage/usb.c	2004-12-23 03:10:13.000000000 +0100
@@ -144,9 +144,7 @@
 	{ USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_QIC, US_PR_BULK) },
 	{ USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_UFI, US_PR_BULK) },
 	{ USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_8070, US_PR_BULK) },
-#if !defined(CONFIG_BLK_DEV_UB) && !defined(CONFIG_BLK_DEV_UB_MODULE)
 	{ USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_SCSI, US_PR_BULK) },
-#endif
 
 	/* Terminating entry */
 	{ }
@@ -220,10 +218,8 @@
 	  .useTransport = US_PR_BULK},
 	{ .useProtocol = US_SC_8070,
 	  .useTransport = US_PR_BULK},
-#if !defined(CONFIG_BLK_DEV_UB) && !defined(CONFIG_BLK_DEV_UB_MODULE)
 	{ .useProtocol = US_SC_SCSI,
 	  .useTransport = US_PR_BULK},
-#endif
 
 	/* Terminating entry */
 	{ NULL }

  parent reply	other threads:[~2004-12-23  2:40 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-20  0:16 RFC: [2.6 patch] let BLK_DEV_UB depend on EMBEDDED Adrian Bunk
2004-12-20  0:29 ` Pete Zaitcev
2004-12-20  0:31 ` Greg KH
2004-12-20  1:35   ` Adrian Bunk
2004-12-20  4:51     ` Pete Zaitcev
2004-12-20  5:09       ` Randy.Dunlap
2004-12-20  6:20         ` Matthew Dharm
2004-12-20  6:37           ` Pete Zaitcev
2004-12-20  7:28             ` [linux-usb-devel] " Phil Dibowitz
2004-12-20  8:09             ` Matthew Dharm
2004-12-20  8:25               ` [linux-usb-devel] " Phil Dibowitz
2004-12-20  8:44               ` Pete Zaitcev
2004-12-20  8:59                 ` [linux-usb-devel] " Phil Dibowitz
2004-12-20 12:02             ` Ed Tomlinson
2004-12-20 15:28               ` [linux-usb-devel] " Alan Stern
2004-12-20 15:35                 ` Greg KH
2004-12-20 20:46                 ` Lee Revell
2004-12-22  8:10             ` Rob Browning
2004-12-23  1:45               ` Theodore Ts'o
2004-12-20  6:43           ` David Brownell
2004-12-20  7:06             ` Pete Zaitcev
2004-12-20 16:03               ` [linux-usb-devel] " David Brownell
2004-12-20  6:30         ` Pete Zaitcev
2004-12-20 15:25           ` [linux-usb-devel] " Alan Stern
2004-12-23  2:40   ` Adrian Bunk [this message]
2005-01-19 22:07     ` RFC: [2.6 patch] let BLK_DEV_UB depend on USB_STORAGE=n Greg KH
2005-01-20  2:49       ` Matthew Dharm
2005-01-21  0:04         ` Greg KH
2005-01-24 11:48       ` David Woodhouse
2005-01-24 17:49         ` Pete Zaitcev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041223024031.GO5217@stusta.de \
    --to=bunk@stusta.de \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=mdharm-usb@one-eyed-alien.net \
    --cc=zaitcev@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.