Re: [PATCH 3/7] usb-storage: Don't bind to uas devices if the uas driver is enabled

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

 



On Fri, 25 Oct 2013, Hans de Goede wrote:

> Hi,
> 
> On 10/24/2013 06:32 PM, Alan Stern wrote:
> > On Thu, 24 Oct 2013, Hans de Goede wrote:
> >
> >> uas devices have 2 alternative settings on their usb-storage interface,
> >> one for usb-storage and one for uas. Using the uas driver is preferred, so if
> >> the uas driver is enabled, and the device has an uas alt setting, don't bind.
> >
> > We need a mechanism for the user to force a device into usb-storage
> > mode, even if the device claims to support UAS.  It would not be at all
> > surprising to find some devices whose UAS support is broken.
> 
> Agreed, this is one of the reasons why I want to share the uas-detect code
> between the uas and usb-storage drivers, so that we can have a single
> place for a blacklist.
> 
> So I think the best way to provide such a user override would be a kernel
> module option. But that needs to belong to a single module, so I see 2 options;
> 1) Turn uas-detect into a separate module
> 2) Use the existing unusual_dev stuff for this and make uas depend on usb-storage
> to get the unusual_dev (included user added extra quirks) from usb-storage
> 
> 2. Makes the most sense to me, since usb-storage will get loaded anyways when
> uas is loaded as they both match on the same usb class.
> 
> If you agree that 2. is probably best then I can do an addon patch adding support
> for a NO_UAS quirk which will cause the uas-detect code to bail with an error if
> present.

How about:

3) Create an unusual_uas.h file containing entries to be shared between 
usb-storage and uas.  Put the NO_UAS quirk entries there.

This way uas will know not to bind to the device (and usb-storage will
know to bind), and you won't have to make uas depend on usb-storage.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux