1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-11-26 11:50:36 +02:00

atusb/fw/usb/atu2.c (handle_ep): cancel RX/TX if we receive a SETUP

This commit is contained in:
Werner Almesberger 2011-03-11 17:45:45 -03:00
parent c265151d2b
commit e5571a26c3

View File

@ -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);