Commit bedeea6e authored by Michael Hennerich's avatar Michael Hennerich Committed by Mike Frysinger

Blackfin: SIC: fix off-by-one error in loop

Make sure we include EMAC_SYSTAT when showing errors.
Signed-off-by: default avatarMichael Hennerich <michael.hennerich@analog.com>
Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
parent 948ca1a7
...@@ -511,7 +511,7 @@ static void bfin_demux_mac_status_irq(unsigned int int_err_irq, ...@@ -511,7 +511,7 @@ static void bfin_demux_mac_status_irq(unsigned int int_err_irq,
int i, irq = 0; int i, irq = 0;
u32 status = bfin_read_EMAC_SYSTAT(); 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)) { if (status & (1L << i)) {
irq = IRQ_MAC_PHYINT + i; irq = IRQ_MAC_PHYINT + i;
break; break;
...@@ -529,8 +529,9 @@ static void bfin_demux_mac_status_irq(unsigned int int_err_irq, ...@@ -529,8 +529,9 @@ static void bfin_demux_mac_status_irq(unsigned int int_err_irq,
} else } else
printk(KERN_ERR printk(KERN_ERR
"%s : %s : LINE %d :\nIRQ ?: MAC ERROR" "%s : %s : LINE %d :\nIRQ ?: MAC ERROR"
" INTERRUPT ASSERTED BUT NO SOURCE FOUND\n", " INTERRUPT ASSERTED BUT NO SOURCE FOUND"
__func__, __FILE__, __LINE__); "(EMAC_SYSTAT=0x%X)\n",
__func__, __FILE__, __LINE__, status);
} }
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment