Re: usb suspend backtraces.

Alan Stern <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
On Mon, 16 Jul 2007, Dave Jones wrote:

> On Mon, Jul 16, 2007 at 03:22:17PM -0400, Alan Stern wrote:
> 
>  > > I'm not sure how that 5-1.4 relates to the above map.
>  > > 
>  > > oh, there's one other case, where it prints the same thing for usb 4-2:
>  > 
>  > All right, it turns out there really is a minor bug that shows up only 
>  > with the autosuspend delay set to 0.  The patch below fixes it (should 
>  > you happen to care).
> 
> Ah, so that's why I was seeing those WARN_ON's ?

Yep.  The old code incremented the parent hub's count of unsuspended 
children _after_ registering the child device -- but at the end of the 
registration procedure the child gets autosuspended.  With a delay of 
0, the child was suspending before the parent's count could be 
incremented; hence the suspend caused the count to go negative briefly.

The patch fixes the problem by incrementing the parent's count _before_ 
registering the child (and then decrementing it afterward if the 
registration failed).

Alan Stern


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.