Re: usb suspend backtraces.

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

 > > -static int usb_autosuspend_delay = 2;		/* Default delay value,
 > > +static int usb_autosuspend_delay = 0;		/* Default delay value,
 > >  						 * in seconds */
 > >  module_param_named(autosuspend, usb_autosuspend_delay, int, 0644);
 > >  MODULE_PARM_DESC(autosuspend, "default autosuspend delay");
 > 
 > Ooh!  Don't do that.  Starting in 2.6.22, setting the delay to 0 means
 > "autosuspend as soon as possible".  (It was different in 2.6.21.) The
 > variable now needs to be set to -1 to prevent autosuspending.

Ah, missed that. Thanks.

 > > in usb_autopm_do_device()
 > > I'm suspecting logic is underflowing here causing this.
 > 
 > Yes, that's what it means.  I'm puzzled as to how this could occur; let 
 > me try some tests.  What types of devices give rise to these warnings?

On the machine I tried it on, there's nothing really exotic..
lsusb shows..
Bus 005 Device 054: ID 0781:5150 SanDisk Corp. SDCZ2 Cruzer Mini Flash Drive (thin)
Bus 005 Device 002: ID 050d:0234 Belkin Components F5U234 USB 2.0 4-Port Hub
Bus 005 Device 001: ID 0000:0000  
Bus 004 Device 003: ID 0aec:3050 Neodio Technologies Corp. ND3050 8-in-1 Card Reader
Bus 004 Device 001: ID 0000:0000  
Bus 003 Device 001: ID 0000:0000  
Bus 002 Device 004: ID 04a9:1097 Canon, Inc. 
Bus 002 Device 003: ID 045e:0053 Microsoft Corp. 
Bus 002 Device 001: ID 0000:0000  
Bus 001 Device 001: ID 0000:0000  

so, usb memory stick, hub, card reader, printer, mouse.

The 28 warnings in my dmesg are all preceded by..
usb 5-1.4: new high speed USB device using ehci_hcd and address 51
usb 5-1.4: configuration #1 chosen from 1 choice

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:

 > The differences between setting usb_autosuspend_delay to -1 and turning 
 > off CONFIG_USB_SUSPEND:
 > 
 > 	Setting the default delay to -1 allows users to enable
 > 	autosuspend on a per-device basis.  For that matter, you
 > 	might want to add a line to the hub driver, to enable
 > 	autosuspend for hubs by default.
 > 
 > 	It adds more code to the kernel (obviously).
 > 
 > 	It changes the way suspend-to-RAM behaves: individual USB
 > 	devices get suspended as opposed to suspending an entire
 > 	bus all at once.  In theory this shouldn't matter.
 > 
 > I can't think of anything else at the moment.

Ok, thanks for the info.

	Dave

-- 
http://www.codemonkey.org.uk

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