From 4bae26a45dbc5ae962266914a647706a20fd2253 Mon Sep 17 00:00:00 2001 From: Yue Wang Date: Tue, 16 Oct 2018 21:54:52 -0400 Subject: [PATCH] usb: fix deadlock caused by switching usb serial port PD#174679: usb: Fix deadlock caused by switching usb serial port. Change-Id: I0bc9bb5d15b5794cfb8e218c03a98c395713e4c0 Signed-off-by: Yue Wang --- drivers/usb/host/xhci-ring.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 8b1e766..0f3d40a 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -1706,13 +1706,13 @@ cleanup: * bits are still set. When an event occurs, switch over to * polling to avoid losing status changes. */ + xhci_dbg(xhci, "%s: starting port polling.\n", __func__); + set_bit(HCD_FLAG_POLL_RH, &hcd->flags); + spin_unlock(&xhci->lock); #ifdef CONFIG_AMLOGIC_USB if (!(temp & PORT_CONNECT) || !(temp & PORT_PE)) set_usb_phy_host_tuning(faked_port_index, 1); #endif - xhci_dbg(xhci, "%s: starting port polling.\n", __func__); - set_bit(HCD_FLAG_POLL_RH, &hcd->flags); - spin_unlock(&xhci->lock); /* Pass this up to the core */ usb_hcd_poll_rh_status(hcd); spin_lock(&xhci->lock); -- 2.7.4