[<prev] [next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.0609191007590.6555-100000@iolanthe.rowland.org>
Date: Tue, 19 Sep 2006 10:08:43 -0400 (EDT)
From: Alan Stern <stern@...land.harvard.edu>
To: Greg KH <greg@...ah.com>, Andrew Morton <akpm@...l.org>
cc: USB development list <linux-usb-devel@...ts.sourceforge.net>,
Kernel development list <linux-kernel@...r.kernel.org>
Subject: [PATCH] USB: fix root-hub resume when CONFIG_USB_SUSPEND is not set
This patch (as786) removes a redundant test and fixes a problem
involving repeated system sleeps when CONFIG_USB_SUSPEND is not set.
During the first wakeup, the root hub's dev.power.power_state.event
field doesn't get updated, causing it not to be suspended during the
second sleep transition.
This takes care of the issue raised by Rafael J. Wysocki and Mattia
Dongili.
Signed-off-by: Alan Stern <stern@...land.harvard.edu>
---
Index: usb-2.6/drivers/usb/core/driver.c
===================================================================
--- usb-2.6.orig/drivers/usb/core/driver.c
+++ usb-2.6/drivers/usb/core/driver.c
@@ -1075,10 +1075,15 @@ int usb_resume_both(struct usb_device *u
PM_EVENT_ON)
status = -EHOSTUNREACH;
}
- if (status == 0 && udev->state == USB_STATE_SUSPENDED)
+ if (status == 0)
status = resume_device(udev);
if (parent)
mutex_unlock(&parent->pm_mutex);
+ } else {
+
+ /* Needed only for setting udev->dev.power.power_state.event
+ * and for possible debugging message. */
+ status = resume_device(udev);
}
/* Now the parent won't suspend until we are finished */
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists