Re: [PATCH 2/2] USB: set hub's default autosuspend delay as 0

2012-09-21 Thread Ming Lei
On Sat, Sep 22, 2012 at 2:24 AM, Alan Stern wrote: > Well, we can go ahead and try it. The main situation where it would > matter would be if two connect or disconnect events occur in quick > succession, and I admit this doesn't happen very often. OK. Also even wrt. the two quick connect or di

Re: [PATCH 2/2] USB: set hub's default autosuspend delay as 0

2012-09-21 Thread Alan Stern
On Sat, 22 Sep 2012, Ming Lei wrote: > On Fri, Sep 21, 2012 at 11:53 PM, Alan Stern > wrote: > > > The hub will also be resumed when a child is accessed via libusb, and > > suspended when the child is released. As a result, the hub gets > > suspended and resumed multiple times: once for itself

Re: [PATCH 2/2] USB: set hub's default autosuspend delay as 0

2012-09-21 Thread Ming Lei
On Sat, Sep 22, 2012 at 12:07 AM, Alan Stern wrote: > On Fri, 21 Sep 2012, Ming Lei wrote: > >> On Fri, Sep 21, 2012 at 12:49 AM, Alan Stern >> wrote: >> > >> > The results will be more impressive if you plug three of the hubs >> > directly into the fourth and attach the fourth hub to the comput

Re: [PATCH 2/2] USB: set hub's default autosuspend delay as 0

2012-09-21 Thread Alan Stern
On Fri, 21 Sep 2012, Ming Lei wrote: > On Fri, Sep 21, 2012 at 12:49 AM, Alan Stern > wrote: > > > > The results will be more impressive if you plug three of the hubs > > directly into the fourth and attach the fourth hub to the computer. > > See all the logs in the below link for the test case

Re: [PATCH 2/2] USB: set hub's default autosuspend delay as 0

2012-09-21 Thread Ming Lei
On Fri, Sep 21, 2012 at 11:53 PM, Alan Stern wrote: > The hub will also be resumed when a child is accessed via libusb, and > suspended when the child is released. As a result, the hub gets > suspended and resumed multiple times: once for itself and once for each > descendant. If the autosuspen

Re: [PATCH 2/2] USB: set hub's default autosuspend delay as 0

2012-09-21 Thread Alan Stern
On Fri, 21 Sep 2012, Ming Lei wrote: > >> IMO, suppose it is a problem, we should try to use 0 to make it > >> working because 'lsusb' is just a tool which isn't involved into actual > >> hub function. > >> > >> I will try to study 'lsusb' to see if there is one problem and try to > >> solve it.

Re: [PATCH 2/2] USB: set hub's default autosuspend delay as 0

2012-09-21 Thread Ming Lei
On Fri, Sep 21, 2012 at 12:49 AM, Alan Stern wrote: > > The results will be more impressive if you plug three of the hubs > directly into the fourth and attach the fourth hub to the computer. See all the logs in the below link for the test case above. http://kernel.ubuntu.com/~ming/ke

Re: [PATCH 2/2] USB: set hub's default autosuspend delay as 0

2012-09-20 Thread Ming Lei
On Fri, Sep 21, 2012 at 12:43 AM, Rajaram R wrote: > On Thu, Sep 20, 2012 at 9:38 PM, Ming Lei wrote: >> >> On Thu, Sep 20, 2012 at 11:23 PM, Ming Lei wrote: >> > >> > I will try to study 'lsusb' to see if there is one problem and try to >> > solve it. >> >> If what you concern is about accessin

Re: [PATCH 2/2] USB: set hub's default autosuspend delay as 0

2012-09-20 Thread Ming Lei
On Fri, Sep 21, 2012 at 12:49 AM, Alan Stern wrote: > On Thu, 20 Sep 2012, Ming Lei wrote: > >> On Thu, Sep 20, 2012 at 10:48 PM, Alan Stern >> wrote: >> > On Thu, 20 Sep 2012, Ming Lei wrote: >> > >> >> This patch sets hub device's default autosuspend delay as 0 to >> >> speedup bus suspend, se

Re: [PATCH 2/2] USB: set hub's default autosuspend delay as 0

2012-09-20 Thread Alan Stern
On Thu, 20 Sep 2012, Ming Lei wrote: > On Thu, Sep 20, 2012 at 10:48 PM, Alan Stern > wrote: > > On Thu, 20 Sep 2012, Ming Lei wrote: > > > >> This patch sets hub device's default autosuspend delay as 0 to > >> speedup bus suspend, see comments in code for details. > > > > The explanation in the

Re: [PATCH 2/2] USB: set hub's default autosuspend delay as 0

2012-09-20 Thread Rajaram R
On Thu, Sep 20, 2012 at 9:38 PM, Ming Lei wrote: > > On Thu, Sep 20, 2012 at 11:23 PM, Ming Lei wrote: > > > > I will try to study 'lsusb' to see if there is one problem and try to > > solve it. > > If what you concern is about accessing device via libusb, it should be > OK since the device will

Re: [PATCH 2/2] USB: set hub's default autosuspend delay as 0

2012-09-20 Thread Ming Lei
On Thu, Sep 20, 2012 at 11:23 PM, Ming Lei wrote: > > I will try to study 'lsusb' to see if there is one problem and try to solve > it. If what you concern is about accessing device via libusb, it should be OK since the device will be resumed in its open() and suspended in its close(). Could yo

Re: [PATCH 2/2] USB: set hub's default autosuspend delay as 0

2012-09-20 Thread Ming Lei
On Thu, Sep 20, 2012 at 10:48 PM, Alan Stern wrote: > On Thu, 20 Sep 2012, Ming Lei wrote: > >> This patch sets hub device's default autosuspend delay as 0 to >> speedup bus suspend, see comments in code for details. > > The explanation in the comments assumes that the only reasons for hubs > to w

Re: [PATCH 2/2] USB: set hub's default autosuspend delay as 0

2012-09-20 Thread Alan Stern
On Thu, 20 Sep 2012, Ming Lei wrote: > This patch sets hub device's default autosuspend delay as 0 to > speedup bus suspend, see comments in code for details. The explanation in the comments assumes that the only reasons for hubs to wake up are because of a connect change or a wakeup request from