Commit 1e5f1283 authored by Stephen Hemminger's avatar Stephen Hemminger

sky2: status irq hang fix

The status interrupt flag should be cleared before processing,
not afterwards to avoid race. Need to process in poll routine
even if no new interrupt status. This is a normal occurrence when
more than 64 frames (NAPI weight) are processed in one poll routine.
Signed-off-by: default avatarStephen Hemminger <shemminger@osdl.org>
parent d3240312
......@@ -2105,7 +2105,6 @@ static int sky2_poll(struct net_device *dev0, int *budget)
int work_done = 0;
u32 status = sky2_read32(hw, B0_Y2_SP_EISR);
if (unlikely(status & ~Y2_IS_STAT_BMU)) {
if (status & Y2_IS_HW_ERR)
sky2_hw_intr(hw);
......@@ -2132,9 +2131,10 @@ static int sky2_poll(struct net_device *dev0, int *budget)
if (status & Y2_IS_CHK_TXA2)
sky2_descriptor_error(hw, 1, "transmit", Y2_IS_CHK_TXA2);
}
if (status & Y2_IS_STAT_BMU) {
if (status & Y2_IS_STAT_BMU)
sky2_write32(hw, STAT_CTRL, SC_STAT_CLR_IRQ);
work_done = sky2_status_intr(hw, work_limit);
*budget -= work_done;
dev0->quota -= work_done;
......@@ -2142,9 +2142,6 @@ static int sky2_poll(struct net_device *dev0, int *budget)
if (work_done >= work_limit)
return 1;
sky2_write32(hw, STAT_CTRL, SC_STAT_CLR_IRQ);
}
mod_timer(&hw->idle_timer, jiffies + HZ);
netif_rx_complete(dev0);
......
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