提交 b3649f3b 编写于 作者: V Vitaly Kuzmichev 提交者: Remy Bohmer

USB-CDC: handle interrupt after dropped pullup

Disconnecting USB gadget with pending interrupt may cause its wrong
handling in the next time when interface will be started again
(especially actual for RNDIS). This interrupt may force the gadget
to queue unexpected response before setup stage.
Despite the fact that such interrupt handled after dropped pullup
also may add pending response, this will not bring to any issues due to
usb_ep_disable (which clears the queue) called on gadget unregistering.
Signed-off-by: NVitaly Kuzmichev <vkuzmichev@mvista.com>
上级 9b70e007
......@@ -1928,6 +1928,13 @@ void usb_eth_halt(struct eth_device *netdev)
return;
usb_gadget_disconnect(dev->gadget);
/* Clear pending interrupt */
if (dev->network_started) {
usb_gadget_handle_interrupts();
dev->network_started = 0;
}
usb_gadget_unregister_driver(&eth_driver);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册