The patch titled
     mystery usb fix
has been added to the -mm tree.  Its filename is
     mystery-usb-fix.patch

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: mystery usb fix
From: Alan Stern <[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!

Cc: "Rafael J. Wysocki" <[EMAIL PROTECTED]>
Cc: Greg KH <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---

 drivers/usb/core/driver.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff -puN drivers/usb/core/driver.c~mystery-usb-fix drivers/usb/core/driver.c
--- a/drivers/usb/core/driver.c~mystery-usb-fix
+++ a/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);
        }
 
_

Patches currently in -mm which might be from [EMAIL PROTECTED] are

scsi-early-detection-of-medium-not-present-updated.patch
mystery-usb-fix.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to