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)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:33:46 +0000 (15:33 -0500)
commit4cd2cd16ed8f28023bc976d039822959e4b34dd6
tree653f7d14ef708f3c4a3d19fa48953de250ed083e
parent6aa7752b9e24162834536b4a49802879d353681e
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