From 9485fbf66e79fa795578dc17768290bbdc3d4296 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 17 Apr 2014 14:02:22 -0600 Subject: [PATCH] SAM3/4 Interrupt initialization. Default interrupt priority not being set correctly --- ChangeLog | 3 +++ arch/arm/src/sam34/sam_irq.c | 2 +- drivers/usbhost/usbhost_hidmouse.c | 8 +++----- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index ed94972acd..79eb3bc4a6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7198,3 +7198,6 @@ compilation. From Leo (2014-4-17). * drivers/usbhost/usbhost_hidmouse.c: Don't include NAKs from the device in the error count. From Leo (2014-4-17). + * arch/arm/src/sam34/sam_irq.c: Fix initialization of the default + priorities (2014-4-17). + diff --git a/arch/arm/src/sam34/sam_irq.c b/arch/arm/src/sam34/sam_irq.c index 00bc99e9d0..575caa3e49 100644 --- a/arch/arm/src/sam34/sam_irq.c +++ b/arch/arm/src/sam34/sam_irq.c @@ -372,7 +372,7 @@ void up_irqinitialize(void) i > 0; i--, regaddr += 4) { - putreg32(0, regaddr); + putreg32(DEFPRIORITY32, regaddr); } /* currents_regs is non-NULL only while processing an interrupt */ diff --git a/drivers/usbhost/usbhost_hidmouse.c b/drivers/usbhost/usbhost_hidmouse.c index 5a9cff0a7a..3ad3b51b7a 100644 --- a/drivers/usbhost/usbhost_hidmouse.c +++ b/drivers/usbhost/usbhost_hidmouse.c @@ -1085,16 +1085,14 @@ static int usbhost_mouse_poll(int argc, char *argv[]) { /* If DRVR_TRANSFER() returns EAGAIN, that simply means that * the devices was not ready and has NAK'ed the transfer. That - * no be treated as an error (unless it persists for a long - * time). + * should not be treated as an error (unless it persists for a + * long time). */ udbg("ERROR: DRVR_TRANSFER returned: %d/%d\n", ret, nerrors); if (ret != -EAGAIN) { - nerrors++; - - if (nerrors > 200) + if (++nerrors > 200) { udbg("Too many errors... aborting: %d\n", nerrors); break;