• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

修订版b3649f3bbfdb2686eceb40a629cef8d4d257f5fa (tree)
时间2011-02-20 04:32:36
作者Vitaly Kuzmichev <vkuzmichev@mvis...>
CommiterRemy Bohmer

Log Message

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: Vitaly Kuzmichev <vkuzmichev@mvista.com>

更改概述

差异

--- a/drivers/usb/gadget/ether.c
+++ b/drivers/usb/gadget/ether.c
@@ -1928,6 +1928,13 @@ void usb_eth_halt(struct eth_device *netdev)
19281928 return;
19291929
19301930 usb_gadget_disconnect(dev->gadget);
1931+
1932+ /* Clear pending interrupt */
1933+ if (dev->network_started) {
1934+ usb_gadget_handle_interrupts();
1935+ dev->network_started = 0;
1936+ }
1937+
19311938 usb_gadget_unregister_driver(&eth_driver);
19321939 }
19331940