forked from Minki/linux
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: Martin Fuzzey <mfuzzey@gmail.com> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
b5c42bc8db
commit
f42706c904
@ -794,7 +794,8 @@ usba_ep_queue(struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags)
|
||||
if (ep->desc) {
|
||||
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 == STATUS_STAGE_IN)))
|
||||
usba_ep_writel(ep, CTL_ENB, USBA_TX_PK_RDY);
|
||||
|
Loading…
Reference in New Issue
Block a user