usb: gadget: Fix issue in queuing notification req upon function suspend
Selective suspend of device with remote-wakeup enabled by host could race with device driver queuing a notification request on interrupt endpoint. Driver calling usb_func_ep_queue() directly and issues function wakeup command to controller and returns success to the function driver. As a result notification request is not queued to endpoint but returns with success and notify_req_queued remains true. If function driver tries to queue any request further this results into request drop as request is already queued. Hence return -EAGAIN in usb_func_ep_queue to queue the notification request upon function resume. Also initiate remote wakeup immediately after suspend if notification request already queued to controller. Change-Id: I7ac9231c44e8126a043886f5d6cedde491ff818d Signed-off-by:Chandana Kishori Chiluveru <cchiluve@codeaurora.org> Signed-off-by:
Sriharsha Allenki <sallenki@codeaurora.org>
Loading
Please register or sign in to comment