提交 b02993c9 编写于 作者: G Grissiom

usbdevice/core: cope with some buggy drivers on USB_MSG_DATA_NOTIFY

Some driver will emit USB_MSG_DATA_NOTIFY before the USB get configured.
Filter out those events.
上级 ed19483c
......@@ -1447,6 +1447,10 @@ static void rt_usbd_thread_entry(void* parameter)
_sof_notify(device);
break;
case USB_MSG_DATA_NOTIFY:
/* some buggy drivers will have USB_MSG_DATA_NOTIFY before the core
* got configured. */
if (device->state != USB_STATE_CONFIGURED)
break;
ep = rt_usbd_find_endpoint(device, &cls, msg.content.ep_msg.ep_addr);
if(ep != RT_NULL)
ep->handler(device, cls, msg.content.ep_msg.size);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册