Re: Bind usb device to another class driver

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

 



hi alan:

2014-08-29 22:54 GMT+08:00 Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>:
> On Fri, 29 Aug 2014, vichy wrote:
>
>> hi all:
>> I have read the article below and try to do the same operation on my device.
>> http://lwn.net/Articles/143397/
>>
>> My environment:
>> 1. my kernel is 3.16
>> 2. device descriptor is attached.
>> 3. below are my operation logs:
>>    # echo -n "4-2:1.0" > /sys/bus/usb/drivers/uas/unbind
>>    # echo -n "4-2:1.0" > /sys/bus/usb/drivers/usb-storage/unbind
>>    bash: echo: write error: No such device
>>    #
>
> Why do you want to bind your drive to usb-storage instead of uas?
I read the article from the web but have no real test case to try on
my pc until I found there are both usb-storage and uas interface on my
external hard disk.

>
>> My questions:
>> 1. is there anything I need to do, such as PCI driver, before bind to
>> usb-storage driver?
>
> Normally, if uas will bind to a device then usb-storage won't.  You can
> change this by using a module paramter for usb-storage:
>
>         modprobe usb-storage quirks=1759:5002:u
>
> (1759 and 5002 are the vendor and product IDs for this device.)
Is there any interface priority written in driver to let uas instead
of usb-storage bind the device?
BTW, if we try not let uas bind the device, why don't we add the quirk
in uas but usb-storage? What is the "u" at the end of command mean?

>
>> 2. I can check whether the usb device is bound to specific driver
>> through "cat /sys/kernel/debug/usb/devices".
>>    is there any alternative way to do so? how about other drivers,
>> except usb, to let user know whether the binding/unbinding
>> successfully and which device is bound to  which driver?
>
>         ls -l /sys/bus/usb/devices/.../driver
>
> where you fill in the "..." with the path for the interface you are
> interested in, such as 1-4:1.0.  Alternatively,
>
>         ls /sys/bus/usb/drivers/.../
>
> where you fill in the "..." with the name of the driver you are
> interested in.
>
I found what you mentioned ^^
appreciate your help,
--
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