Re: Composite USB device reset /drivers/usb/core/hub.c - binding order problem

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

 



Thanks, right I was looking at older version of Linux (3.8) before
https://github.com/torvalds/linux/commit/6aec044cc2f5670cf3b143c151c8be846499bd15.
But the question remains why post_reset method is called in reverse
order for interfaces.
Is there any reason for this ? especially after rebind has been
changed in above mentioned patch from reverse to forward order.

On Thu, Mar 17, 2016 at 6:57 PM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
> On Thu, 17 Mar 2016, Mikolaj Ch wrote:
>
>> Hi,
>>
>> I have a composite usb device where order of binding the drivers to
>> interfaces matters.
>> When the device is plugged in binding is from 0-th till n-th interface
>> but in usb_reset_device function in  /drivers/usb/core/hub.c after
>> reset binding is done in revers order from n-th till 0.
>> Is there a reason for doing so ?
>
> You are reading the code wrong.  usb_reset_device() calls the
> post_reset methods of the interface drivers in reverse order, but the
> rebinding is done by rebind_marked_interfaces() in driver.c in forward
> order.
>
> Alan Stern
>
>> Can I expect any disadvantages after changing this order to be from 0
>> till n-th ?
>>
>> I know that the easiest solution is to claim the device driver is
>> badly written but I don't have a possibility to change it so I want to
>> know if changing this order in usb cored driver is possible without
>> affecting other functionality.
>
--
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