OSDN Git Service

usb: dwc3: gadget: Resolve recursive spinlock during remote wakeup
authorJack Pham <jackp@codeaurora.org>
Fri, 29 Jan 2016 19:46:05 +0000 (11:46 -0800)
committerDavid Keitel <dkeitel@codeaurora.org>
Tue, 22 Mar 2016 18:06:41 +0000 (11:06 -0700)
commitb0b1bb59407262e425fcb5a95f7df72a156c99ab
tree43567fd34e95e182ce61bbf59a84bd16c40e0349
parentc6d80a92b79d6b50129a27e8747c5a490da367e3
usb: dwc3: gadget: Resolve recursive spinlock during remote wakeup

When a USB function wishes to send new data during USB suspend state, it
needs to issue USB remote wakeup and send a function wakeup notification
after then. This scenario leads to recursive spin locking inside the
_usb_func_wakeup() function, because this function gets called recursively.
This function issues remote wakeup, which internally calls the resume
interrupt callback, which calls the _usb_func_wakeup() function again.
This issue is resolved by performing the remote wakeup in a deferred work
context, and this splits the recursion loop.

CRs-fixed: 700667
Change-Id: I59c8efde098781587d29f08cd60e4aa3521949d8
Signed-off-by: Danny Segal <dsegal@codeaurora.org>
drivers/usb/dwc3/gadget.c