Commit b02022b8 authored by Mallikarjuna R Chilakala's avatar Mallikarjuna R Chilakala Committed by Jeff Garzik

[PATCH] e1000: Robert Olsson's fix and refinement

1 Robert Olsson's fix and refinement to the poll routine
Signed-off-by: default avatarMallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Signed-off-by: default avatarGanesh Venkatesan <ganesh.venkatesan@intel.com>
Signed-off-by: default avatarJohn Ronciak <john.ronciak@intel.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
parent db8a1d49
......@@ -2174,24 +2174,21 @@ e1000_clean(struct net_device *netdev, int *budget)
int tx_cleaned;
int work_done = 0;
if (!netif_carrier_ok(netdev))
goto quit_polling;
tx_cleaned = e1000_clean_tx_irq(adapter);
e1000_clean_rx_irq(adapter, &work_done, work_to_do);
*budget -= work_done;
netdev->quota -= work_done;
/* if no Rx and Tx cleanup work was done, exit the polling mode */
if(!tx_cleaned || (work_done < work_to_do) ||
/* if no Tx and not enough Rx work done, exit the polling mode */
if((!tx_cleaned && (work_done < work_to_do)) ||
!netif_running(netdev)) {
quit_polling: netif_rx_complete(netdev);
netif_rx_complete(netdev);
e1000_irq_enable(adapter);
return 0;
}
return (work_done >= work_to_do);
return 1;
}
#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