Re: 2.6.23-rc6-mm1: failure to boot on HP nx6325, no sound when booted, USB-related WARNING

Alan Stern <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
On Wed, 19 Sep 2007, Rafael J. Wysocki wrote:

> On Wednesday, 19 September 2007 16:22, Alan Stern wrote:
> > On Tue, 18 Sep 2007, Rafael J. Wysocki wrote:
> > 
> > > Additionally, I've got a couple of these:
> > > 
> > > WARNING: at /home/rafael/src/mm/linux-2.6.23-rc6-mm1/drivers/usb/core/driver.c:1
> > > 217 usb_autopm_do_device()
> > > 
> > > Call Trace:
> > >  [<ffffffff8813885e>] :usbcore:usb_autopm_do_device+0x60/0xe9
> > >  [<ffffffff88138910>] :usbcore:usb_autosuspend_device+0xc/0xe
> > >  [<ffffffff88131aa8>] :usbcore:usb_disconnect+0x15f/0x18c
> > >  [<ffffffff88133305>] :usbcore:hub_thread+0x691/0x10a1
> > >  [<ffffffff8024a077>] autoremove_wake_function+0x0/0x38
> > >  [<ffffffff88132c74>] :usbcore:hub_thread+0x0/0x10a1
> > >  [<ffffffff80249f50>] kthread+0x49/0x79
> > >  [<ffffffff8020ce98>] child_rip+0xa/0x12
> > >  [<ffffffff80249f07>] kthread+0x0/0x79
> > >  [<ffffffff8020ce8e>] child_rip+0x0/0x12
> > 
> > Please provide a complete dmesg log with CONFIG_USB_DEBUG enabled.

Okay, I think I've got it.  The patch below should fix the problem -- I 
haven't tried it out yet so you're the guinea pig!

Alan Stern


Index: 2.6.23-rc6-mm1/drivers/usb/core/driver.c
===================================================================
--- 2.6.23-rc6-mm1.orig/drivers/usb/core/driver.c
+++ 2.6.23-rc6-mm1/drivers/usb/core/driver.c
@@ -1097,7 +1097,12 @@ static int usb_suspend_both(struct usb_d
 			usb_hcd_flush_endpoint(udev, udev->ep_out[i]);
 			usb_hcd_flush_endpoint(udev, udev->ep_in[i]);
 		}
-		if (parent)
+
+		/* If this is just a FREEZE or a PRETHAW, udev might
+		 * not really be suspended.  Only true suspends get
+		 * propagated up the device tree.
+		 */
+		if (parent && udev->state == USB_STATE_SUSPENDED)
 			usb_autosuspend_device(parent);
 	}
 


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
[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.