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]

 



On Fri, 18 Mar 2016, Mikolaj Ch wrote:

> 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.

It is an example of a common pattern found throughout the kernel: When 
undoing a series of actions, undo them in the reverse order from the 
way they were done originally.  Since we call pre_reset in forward 
order, we undo this by calling post_reset in reverse order.

> Is there any reason for this ? especially after rebind has been
> changed in above mentioned patch from reverse to forward order.

If you're asking whether changing it to use forward order would create 
a bug, I don't know.

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