Re: [PATCH] usb/uas: only bind if the hcd supports SG

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

 



On Wed, 11 Jan 2012, Sebastian Andrzej Siewior wrote:

> On 01/11/2012 05:22 PM, Alan Stern wrote:
> > On Wed, 11 Jan 2012, Sebastian Andrzej Siewior wrote:
> >> So you would prefer to handle this in kernel instead of in userland via
> >> usb_modeswitch?
> >
> > Is there any reason not to?
> 
> Well no. Even if you override it in kernel the user still could switch
> it if he wants to.

How?  If usb-storage refuses to bind to devices that support UAS, the 
user has no way to force it to bind.

> > BTW, do you know how usb-modeswitch handles these devices?  The only
> > approach I can think of would be to unbind the interface from
> > usb-storage (via sysfs) and bind it to uas.  Is usb-modeswitch smart
> > enough to switch back to usb-storage if uas fails to bind?
> 
> Right now it is really dump but it is the first tool that came to mind.
> It is trigged via udev, it has vid/pid database it feels responsible.
> Once it finds a device it knows (according to another database) what to
> do to switch from one device to another. It does usually more than just
> a set interface call. It used by a lot of usb sticks which appear to be
> a cd-rom device and after a magic command the 3G modem appears :)
> 
> So right it won't notice that the driver can't bind, maybe it is not
> the right tool for this approach.
> 
> Felipe, what is Nokia and the other people that have the multi-
> functional gadgets use to switch from one function to the other?

Do those gadgets use separate _altsettings_ for BOT vs. UAS, or do they 
use separate _configs_?

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