[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: libusual interface [was Re: libusual and ub]



On Sat, 17 Dec 2005 02:21:50 -0500, Bill Nottingham <notting redhat com> wrote:

> I mean separate the aliases *into the base drivers themselves* - not
> using libusual at all. i.e., a given usb id only matches one of
> usb-storage or ub.

Nothing new in this approach either. This is how ub worked way before
libusual, and before Adrian Bunk broke it. The problem is, users require
a capability to switch between drivers. And we cannot predict which one
they want to use for any given device.

This (old scheme) was similar to the situation with eepro100/e100,
uhci/usb-uhci and other pairs. However, users weren't content with
just loading drivers, they wanted hotplug to work, and so I did exactly
that, "a given usb id only matches one of usb-storage or ub."

That patch worked like this:

diff -urp -X dontdiff linux-2.6.12/drivers/usb/storage/usb.c linux-2.6.12-lem/drivers/usb/storage/usb.c
--- linux-2.6.12/drivers/usb/storage/usb.c	2005-06-17 12:48:29.000000000 -0700
+++ linux-2.6.12-lem/drivers/usb/storage/usb.c	2005-07-25 22:12:53.000000000 -0700
@@ -150,7 +150,9 @@ static struct usb_device_id storage_usb_
 	{ 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 */
 	{ }
@@ -224,8 +226,10 @@ static struct us_unusual_dev us_unusual_
 	  .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 }

The libusual is a result of trying (possibly) everything else. But by
all means, keep throwing ideas.

-- Pete


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]