]> git.baikalelectronics.ru Git - kernel.git/commit
USB: flush outstanding URBs when suspending
authorAlan Stern <stern@rowland.harvard.edu>
Mon, 10 Sep 2007 15:34:26 +0000 (11:34 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 12 Oct 2007 21:55:26 +0000 (14:55 -0700)
commit30607e8ad2bae30777c0e32ce865e483b495dc9f
treecfc969126e5915db6536382cddbfdd9a63f5b3c8
parent7f66bbad7ab8293fc28896bc79fb5d0772d17bc1
USB: flush outstanding URBs when suspending

This patch (as989) makes usbcore flush all outstanding URBs for each
device as the device is suspended.  This will be true even when
CONFIG_USB_SUSPEND is not enabled.

In addition, an extra can_submit flag is added to the usb_device
structure.  That flag will be turned off whenever a suspend request
has been received for the device, even if the device isn't actually
suspended because CONFIG_USB_SUSPEND isn't set.

It's no longer necessary to check for the device state being equal to
USB_STATE_SUSPENDED during URB submission; that check can be replaced
by a check of the can_submit flag.  This also permits us to remove
some questionable references to the deprecated power.power_state field.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/driver.c
drivers/usb/core/hcd.c
drivers/usb/core/hub.c
drivers/usb/core/urb.c
drivers/usb/core/usb.c
include/linux/usb.h