usb: xhci: fix spinlock recursion for USB2 test mode
authorPeter Chen <peter.chen@nxp.com>
Thu, 20 Jul 2017 11:48:30 +0000 (14:48 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Jul 2017 12:40:36 +0000 (14:40 +0200)
commit576d55460e7f209139545a348746c2fcadf61bc3
tree53dbbc025a5e4a8d7a426e9ee763daf520b55d89
parenta54408d0a004757789863d74e29c2297edae0b4d
usb: xhci: fix spinlock recursion for USB2 test mode

Both xhci_hub_control and xhci_disable_slot tries to hold spinlock, the
spinlock recursion occurs when enters USB2 test mode. Fix it by unlock
spinlock before calling xhci_disable_slot.

Cc: <stable@vger.kernel.org>
Fixes: 0f1d832ed1fb ("usb: xhci: Add port test modes support for usb2")
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-hub.c