aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tg3.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r--drivers/net/tg3.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 4ab9680ffbd2..4d2bdbdd34e8 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -2869,9 +2869,6 @@ static int tg3_poll(struct net_device *netdev, int *budget)
2869 2869
2870 spin_lock_irqsave(&tp->lock, flags); 2870 spin_lock_irqsave(&tp->lock, flags);
2871 2871
2872 if (tp->tg3_flags & TG3_FLAG_TAGGED_STATUS)
2873 tp->last_tag = sblk->status_tag;
2874
2875 /* handle link change and other phy events */ 2872 /* handle link change and other phy events */
2876 if (!(tp->tg3_flags & 2873 if (!(tp->tg3_flags &
2877 (TG3_FLAG_USE_LINKCHG_REG | 2874 (TG3_FLAG_USE_LINKCHG_REG |
@@ -2896,7 +2893,6 @@ static int tg3_poll(struct net_device *netdev, int *budget)
2896 * All RX "locking" is done by ensuring outside 2893 * All RX "locking" is done by ensuring outside
2897 * code synchronizes with dev->poll() 2894 * code synchronizes with dev->poll()
2898 */ 2895 */
2899 done = 1;
2900 if (sblk->idx[0].rx_producer != tp->rx_rcb_ptr) { 2896 if (sblk->idx[0].rx_producer != tp->rx_rcb_ptr) {
2901 int orig_budget = *budget; 2897 int orig_budget = *budget;
2902 int work_done; 2898 int work_done;
@@ -2908,12 +2904,14 @@ static int tg3_poll(struct net_device *netdev, int *budget)
2908 2904
2909 *budget -= work_done; 2905 *budget -= work_done;
2910 netdev->quota -= work_done; 2906 netdev->quota -= work_done;
2911
2912 if (work_done >= orig_budget)
2913 done = 0;
2914 } 2907 }
2915 2908
2909 if (tp->tg3_flags & TG3_FLAG_TAGGED_STATUS)
2910 tp->last_tag = sblk->status_tag;
2911 rmb();
2912
2916 /* if no more work, tell net stack and NIC we're done */ 2913 /* if no more work, tell net stack and NIC we're done */
2914 done = !tg3_has_work(tp);
2917 if (done) { 2915 if (done) {
2918 spin_lock_irqsave(&tp->lock, flags); 2916 spin_lock_irqsave(&tp->lock, flags);
2919 __netif_rx_complete(netdev); 2917 __netif_rx_complete(netdev);