aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sky2.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/sky2.c')
-rw-r--r--drivers/net/sky2.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 227df9876a2c..76da74fbe859 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -2105,7 +2105,6 @@ static int sky2_poll(struct net_device *dev0, int *budget)
2105 int work_done = 0; 2105 int work_done = 0;
2106 u32 status = sky2_read32(hw, B0_Y2_SP_EISR); 2106 u32 status = sky2_read32(hw, B0_Y2_SP_EISR);
2107 2107
2108 restart_poll:
2109 if (unlikely(status & ~Y2_IS_STAT_BMU)) { 2108 if (unlikely(status & ~Y2_IS_STAT_BMU)) {
2110 if (status & Y2_IS_HW_ERR) 2109 if (status & Y2_IS_HW_ERR)
2111 sky2_hw_intr(hw); 2110 sky2_hw_intr(hw);
@@ -2136,7 +2135,7 @@ static int sky2_poll(struct net_device *dev0, int *budget)
2136 } 2135 }
2137 2136
2138 if (status & Y2_IS_STAT_BMU) { 2137 if (status & Y2_IS_STAT_BMU) {
2139 work_done += sky2_status_intr(hw, work_limit - work_done); 2138 work_done = sky2_status_intr(hw, work_limit);
2140 *budget -= work_done; 2139 *budget -= work_done;
2141 dev0->quota -= work_done; 2140 dev0->quota -= work_done;
2142 2141
@@ -2148,22 +2147,9 @@ static int sky2_poll(struct net_device *dev0, int *budget)
2148 2147
2149 mod_timer(&hw->idle_timer, jiffies + HZ); 2148 mod_timer(&hw->idle_timer, jiffies + HZ);
2150 2149
2151 local_irq_disable(); 2150 netif_rx_complete(dev0);
2152 __netif_rx_complete(dev0);
2153 2151
2154 status = sky2_read32(hw, B0_Y2_SP_LISR); 2152 status = sky2_read32(hw, B0_Y2_SP_LISR);
2155
2156 if (unlikely(status)) {
2157 /* More work pending, try and keep going */
2158 if (__netif_rx_schedule_prep(dev0)) {
2159 __netif_rx_reschedule(dev0, work_done);
2160 status = sky2_read32(hw, B0_Y2_SP_EISR);
2161 local_irq_enable();
2162 goto restart_poll;
2163 }
2164 }
2165
2166 local_irq_enable();
2167 return 0; 2153 return 0;
2168} 2154}
2169 2155
@@ -2181,6 +2167,8 @@ static irqreturn_t sky2_intr(int irq, void *dev_id, struct pt_regs *regs)
2181 prefetch(&hw->st_le[hw->st_idx]); 2167 prefetch(&hw->st_le[hw->st_idx]);
2182 if (likely(__netif_rx_schedule_prep(dev0))) 2168 if (likely(__netif_rx_schedule_prep(dev0)))
2183 __netif_rx_schedule(dev0); 2169 __netif_rx_schedule(dev0);
2170 else
2171 printk(KERN_DEBUG PFX "irq race detected\n");
2184 2172
2185 return IRQ_HANDLED; 2173 return IRQ_HANDLED;
2186} 2174}