提交 f42706c9 编写于 作者: M Martin Fuzzey 提交者: Greg Kroah-Hartman

USB: atmel-usba-udc : fix control out requests.

usbtest #14 was failing with "udc: ep0: TXCOMP: Invalid endpoint state 2, halting endpoint..."
This occured since ep0 is bidirectional and ep->is_in is not valid (must always use ep->state)
Signed-off-by: NMartin Fuzzey <mfuzzey@gmail.com>
Acked-by: NDavid Brownell <dbrownell@users.sourceforge.net>
Acked-by: NHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 b5c42bc8
...@@ -794,7 +794,8 @@ usba_ep_queue(struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags) ...@@ -794,7 +794,8 @@ usba_ep_queue(struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags)
if (ep->desc) { if (ep->desc) {
list_add_tail(&req->queue, &ep->queue); list_add_tail(&req->queue, &ep->queue);
if (ep->is_in || (ep_is_control(ep) if ((!ep_is_control(ep) && ep->is_in) ||
(ep_is_control(ep)
&& (ep->state == DATA_STAGE_IN && (ep->state == DATA_STAGE_IN
|| ep->state == STATUS_STAGE_IN))) || ep->state == STATUS_STAGE_IN)))
usba_ep_writel(ep, CTL_ENB, USBA_TX_PK_RDY); usba_ep_writel(ep, CTL_ENB, USBA_TX_PK_RDY);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册