aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/r8169.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index b30e13867e1e..882c59fe9f8d 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -457,10 +457,10 @@ static void rtl8169_hw_start(struct net_device *dev);
457static int rtl8169_close(struct net_device *dev); 457static int rtl8169_close(struct net_device *dev);
458static void rtl8169_set_rx_mode(struct net_device *dev); 458static void rtl8169_set_rx_mode(struct net_device *dev);
459static void rtl8169_tx_timeout(struct net_device *dev); 459static void rtl8169_tx_timeout(struct net_device *dev);
460static struct net_device_stats *rtl8169_get_stats(struct net_device *netdev); 460static struct net_device_stats *rtl8169_get_stats(struct net_device *dev);
461static int rtl8169_rx_interrupt(struct net_device *, struct rtl8169_private *, 461static int rtl8169_rx_interrupt(struct net_device *, struct rtl8169_private *,
462 void __iomem *); 462 void __iomem *);
463static int rtl8169_change_mtu(struct net_device *netdev, int new_mtu); 463static int rtl8169_change_mtu(struct net_device *dev, int new_mtu);
464static void rtl8169_down(struct net_device *dev); 464static void rtl8169_down(struct net_device *dev);
465 465
466#ifdef CONFIG_R8169_NAPI 466#ifdef CONFIG_R8169_NAPI
@@ -2360,7 +2360,7 @@ rtl8169_rx_interrupt(struct net_device *dev, struct rtl8169_private *tp,
2360 rx_left = NUM_RX_DESC + tp->dirty_rx - cur_rx; 2360 rx_left = NUM_RX_DESC + tp->dirty_rx - cur_rx;
2361 rx_left = rtl8169_rx_quota(rx_left, (u32) dev->quota); 2361 rx_left = rtl8169_rx_quota(rx_left, (u32) dev->quota);
2362 2362
2363 while (rx_left > 0) { 2363 for (; rx_left > 0; rx_left--, cur_rx++) {
2364 unsigned int entry = cur_rx % NUM_RX_DESC; 2364 unsigned int entry = cur_rx % NUM_RX_DESC;
2365 struct RxDesc *desc = tp->RxDescArray + entry; 2365 struct RxDesc *desc = tp->RxDescArray + entry;
2366 u32 status; 2366 u32 status;
@@ -2370,7 +2370,7 @@ rtl8169_rx_interrupt(struct net_device *dev, struct rtl8169_private *tp,
2370 2370
2371 if (status & DescOwn) 2371 if (status & DescOwn)
2372 break; 2372 break;
2373 if (status & RxRES) { 2373 if (unlikely(status & RxRES)) {
2374 if (netif_msg_rx_err(tp)) { 2374 if (netif_msg_rx_err(tp)) {
2375 printk(KERN_INFO 2375 printk(KERN_INFO
2376 "%s: Rx ERROR. status = %08x\n", 2376 "%s: Rx ERROR. status = %08x\n",
@@ -2397,7 +2397,7 @@ rtl8169_rx_interrupt(struct net_device *dev, struct rtl8169_private *tp,
2397 tp->stats.rx_dropped++; 2397 tp->stats.rx_dropped++;
2398 tp->stats.rx_length_errors++; 2398 tp->stats.rx_length_errors++;
2399 rtl8169_mark_to_asic(desc, tp->rx_buf_sz); 2399 rtl8169_mark_to_asic(desc, tp->rx_buf_sz);
2400 goto move_on; 2400 continue;
2401 } 2401 }
2402 2402
2403 rtl8169_rx_csum(skb, desc); 2403 rtl8169_rx_csum(skb, desc);
@@ -2426,9 +2426,6 @@ rtl8169_rx_interrupt(struct net_device *dev, struct rtl8169_private *tp,
2426 tp->stats.rx_bytes += pkt_size; 2426 tp->stats.rx_bytes += pkt_size;
2427 tp->stats.rx_packets++; 2427 tp->stats.rx_packets++;
2428 } 2428 }
2429move_on:
2430 cur_rx++;
2431 rx_left--;
2432 } 2429 }
2433 2430
2434 count = cur_rx - tp->cur_rx; 2431 count = cur_rx - tp->cur_rx;