]> git.baikalelectronics.ru Git - kernel.git/commit
USB: handle LPM errors during device suspend correctly
authorAlan Stern <stern@rowland.harvard.edu>
Tue, 30 Jul 2013 19:39:02 +0000 (15:39 -0400)
committerSarah Sharp <sarah.a.sharp@linux.intel.com>
Thu, 15 Aug 2013 17:52:32 +0000 (10:52 -0700)
commit626578ddc66b7e1d82b9b5c681c0ab93f5ebb946
treeaf66d029aabd6272e4600de5a978476799fdb388
parentb72d8409f7d10ade18baf6ab8f6e0d696b6a98a6
USB: handle LPM errors during device suspend correctly

The hub driver's usb_port_suspend() routine doesn't handle errors
related to Link Power Management properly.  It always returns failure,
it doesn't try to clean up the wakeup setting, (in the case of system
sleep) it doesn't try to go ahead with the port suspend regardless,
and it doesn't try to apply the new power-off mechanism.

This patch fixes these problems.

Note: Sarah fixed this patch to apply against 3.11, since the original
commit (76d4c949cfa667255a74254c93ead1e963c76beb "USB: handle LPM errors
during device suspend correctly") called usb_disable_remote_wakeup,
which won't be added until 3.12.

This patch should be backported to kernels as old as 3.5, that
contain the commit df44bd44d6d20a40f430520c665b38bbcd16ce05 "USB:
Disable USB 3.0 LPM in critical sections.".  There will be merge
conflicts, since LTM wasn't added until 3.6.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@vger.kernel.org
drivers/usb/core/hub.c