From 60ee82ba937435a1fdd2b3ed3a759382887559c7 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Mon, 1 Apr 2013 12:48:30 -0300 Subject: [PATCH] atusb/fw/mac.c (handle_irq): only handle TRX_END; never fall back to seq ints --- atusb/fw/mac.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/atusb/fw/mac.c b/atusb/fw/mac.c index 86f57f3..11fffec 100644 --- a/atusb/fw/mac.c +++ b/atusb/fw/mac.c @@ -70,6 +70,9 @@ static bool handle_irq(void) uint8_t size, i; irq = reg_read(REG_IRQ_STATUS); + if (!(irq & IRQ_TRX_END)) + return 1; + if (txing) { if (eps[1].state == EP_IDLE) usb_send(&eps[1], "", 1, rx_done, NULL); @@ -79,11 +82,8 @@ static bool handle_irq(void) queued_tx_ack = 1; } txing = 0; - return 0; - } - - if (!(irq & IRQ_TRX_END)) return 1; + } /* unlikely */ if (eps[1].state != EP_IDLE)