Blackfin: SIC: fix off-by-one error in loop
authorMichael Hennerich <michael.hennerich@analog.com>
Fri, 20 Aug 2010 11:59:27 +0000 (11:59 +0000)
committerMike Frysinger <vapier@gentoo.org>
Fri, 22 Oct 2010 07:48:57 +0000 (03:48 -0400)
Make sure we include EMAC_SYSTAT when showing errors.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
arch/blackfin/mach-common/ints-priority.c

index eaece5f84e428011d57a8943da8ad603762e9f27..0df4fb57f5ba030fd8993b8738a23e2282706a98 100644 (file)
@@ -511,7 +511,7 @@ static void bfin_demux_mac_status_irq(unsigned int int_err_irq,
        int i, irq = 0;
        u32 status = bfin_read_EMAC_SYSTAT();
 
-       for (i = 0; i < (IRQ_MAC_STMDONE - IRQ_MAC_PHYINT); i++)
+       for (i = 0; i <= (IRQ_MAC_STMDONE - IRQ_MAC_PHYINT); i++)
                if (status & (1L << i)) {
                        irq = IRQ_MAC_PHYINT + i;
                        break;
@@ -529,8 +529,9 @@ static void bfin_demux_mac_status_irq(unsigned int int_err_irq,
        } else
                printk(KERN_ERR
                       "%s : %s : LINE %d :\nIRQ ?: MAC ERROR"
-                      " INTERRUPT ASSERTED BUT NO SOURCE FOUND\n",
-                      __func__, __FILE__, __LINE__);
+                      " INTERRUPT ASSERTED BUT NO SOURCE FOUND"
+                      "(EMAC_SYSTAT=0x%X)\n",
+                      __func__, __FILE__, __LINE__, status);
 }
 #endif