From 911eb4d4b509f5ef98922cefd5bc1ea14c720175 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Wed, 13 Feb 2013 01:35:23 -0300 Subject: [PATCH] fw/mac.c (handle_irq): read REG_IRQ_STATUS also if we ignore the value Else, we won't get any further interrupts. --- atusb/fw/mac.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/atusb/fw/mac.c b/atusb/fw/mac.c index e2894f5..05457a4 100644 --- a/atusb/fw/mac.c +++ b/atusb/fw/mac.c @@ -1,8 +1,8 @@ /* * fw/mac.c - HardMAC functions * - * Written 2011 by Werner Almesberger - * Copyright 2011 Werner Almesberger + * Written 2011, 2013 by Werner Almesberger + * Copyright 2011, 2013 Werner Almesberger * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -68,6 +68,7 @@ static int handle_irq(void) uint8_t irq; uint8_t size, i; + irq = reg_read(REG_IRQ_STATUS); if (txing) { if (eps[1].state == EP_IDLE) usb_send(&eps[1], "", 1, rx_done, NULL); @@ -80,7 +81,6 @@ static int handle_irq(void) return 0; } - irq = reg_read(REG_IRQ_STATUS); if (!(irq & IRQ_TRX_END)) return 1;