]> git.baikalelectronics.ru Git - kernel.git/commit
xhci: Reserve one command for USB3 LPM disable.
authorSarah Sharp <sarah.a.sharp@linux.intel.com>
Tue, 8 May 2012 14:32:03 +0000 (07:32 -0700)
committerSarah Sharp <sarah.a.sharp@linux.intel.com>
Fri, 18 May 2012 22:42:01 +0000 (15:42 -0700)
commiteae844bd7ed796f4dc75406a1e02b9ef8988cad6
tree4c0c1daf3895f65a65e7714a5f0e3e3ea7e12f81
parent622d6b9226ee1125850f4e6128a509e6595ef145
xhci: Reserve one command for USB3 LPM disable.

We want to do everything we can to ensure that USB 3.0 Link Power
Management (LPM) can be disabled when it is enabled.  If LPM can't be
disabled, we can't suspend USB 3.0 devices, or reset them.  To make sure
we can submit the command to disable LPM, allocate a command in the
xhci_hcd structure, and reserve one TRB on the command ring.

We only need one command per xHCI driver instance, because LPM is only
disabled or enabled while the USB core is holding the bandwidth_mutex
that is shared between the xHCI USB 2.0 and USB 3.0 roothubs.  The
bandwidth_mutex will be held until the command completes, or times out.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
drivers/usb/host/xhci-mem.c
drivers/usb/host/xhci.h