From e5571a26c3fe4bc023f27234d8dfe4d67bfe7eed Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Fri, 11 Mar 2011 17:45:45 -0300 Subject: [PATCH] atusb/fw/usb/atu2.c (handle_ep): cancel RX/TX if we receive a SETUP --- atusb/fw/usb/atu2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/atusb/fw/usb/atu2.c b/atusb/fw/usb/atu2.c index 79923d1..68461b3 100644 --- a/atusb/fw/usb/atu2.c +++ b/atusb/fw/usb/atu2.c @@ -131,6 +131,7 @@ static void handle_ep(int n) UENUM = n; if (UEINTX & (1 << RXSTPI)) { /* @@@ EP_RX. EP_TX: cancel */ + ep->state = EP_IDLE; if (!ep_setup()) goto stall; UEINTX &= ~(1 << RXSTPI); @@ -149,7 +150,7 @@ static void handle_ep(int n) UEINTX &= ~(1 << STALLEDI); } if (UEINTX & (1 << TXINI)) { - /* @@ EP_RX: cancel */ + /* @@ EP_RX: cancel (?) */ if (ep->state == EP_TX) { ep_tx(ep); UEINTX &= ~(1 << TXINI);