USB: EHCI & UHCI: fix race between root-hub suspend and port resume
commit4f0e35f03db2673dc86ee940dcaab5f8f422dc81
authorAlan Stern <stern@rowland.harvard.edu>
Fri, 8 Jan 2010 16:18:20 +0000 (8 11:18 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 1 Apr 2010 22:55:37 +0000 (1 15:55 -0700)
tree17d37fb38474f376a5a30efbd51a2f5a70a08b73
parent16505a92d463c96d223091fa35f9d084c0813606
USB: EHCI & UHCI: fix race between root-hub suspend and port resume

commit cec3a53c7fe794237b582e8e77fc0e48465e65ee upstream.

This patch (as1321) fixes a problem with EHCI and UHCI root-hub
suspends: If the suspend occurs while a port is trying to resume, the
resume doesn't finish and simply gets lost.  When remote wakeup is
enabled, this is undesirable behavior.

The patch checks first to see if any port resumes are in progress, and
if they are then it fails the root-hub suspend with -EBUSY.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/ehci-hub.c
drivers/usb/host/uhci-hcd.c