]> git.baikalelectronics.ru Git - kernel.git/commit
USB: add usb_hcd_{start,end}_port_resume
authorAlan Stern <stern@rowland.harvard.edu>
Fri, 25 Jan 2013 22:09:42 +0000 (17:09 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Jan 2013 23:06:01 +0000 (15:06 -0800)
commit1be1f8b65d11b3d7f63fe679e3d3805c790b16f1
tree7d5e1d583787b07d6627f4acd46da1cc38deaf93
parentf1e4030ecf5d6ad58dea5a1a0638ff9e661e0564
USB: add usb_hcd_{start,end}_port_resume

This patch (as1649) adds a mechanism for host controller drivers to
inform usbcore when they have begun or ended resume signalling on a
particular root-hub port.  The core will then make sure that the root
hub does not get runtime-suspended while the port resume is going on.

Since commit 170ddb347d5afffd52eb458159a3e655e171c736 (USB: set hub's
default autosuspend delay as 0), the system tries to suspend hubs
whenever they aren't in use.  While a root-hub port is being resumed,
the root hub does not appear to be in use.  Attempted runtime suspends
fail because of the ongoing port resume, but the PM core just keeps on
trying over and over again.  We want to prevent this wasteful effort.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/hcd.c
include/linux/usb.h
include/linux/usb/hcd.h