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

[PATCH] ixgb: Robert Olsson's fix and refinement to poll

obert 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 187dcf19
...@@ -1670,19 +1670,15 @@ ixgb_clean(struct net_device *netdev, int *budget) ...@@ -1670,19 +1670,15 @@ ixgb_clean(struct net_device *netdev, int *budget)
int tx_cleaned; int tx_cleaned;
int work_done = 0; int work_done = 0;
if (!netif_carrier_ok(netdev))
goto quit_polling;
tx_cleaned = ixgb_clean_tx_irq(adapter); tx_cleaned = ixgb_clean_tx_irq(adapter);
ixgb_clean_rx_irq(adapter, &work_done, work_to_do); ixgb_clean_rx_irq(adapter, &work_done, work_to_do);
*budget -= work_done; *budget -= work_done;
netdev->quota -= work_done; netdev->quota -= work_done;
/* if no Tx cleanup and not enough Rx work done, exit the polling mode */ /* if no Tx and not enough Rx work done, exit the polling mode */
if((!tx_cleaned && (work_done < work_to_do)) || if((!tx_cleaned && (work_done == 0)) || !netif_running(netdev)) {
!netif_running(netdev)) { netif_rx_complete(netdev);
quit_polling: netif_rx_complete(netdev);
ixgb_irq_enable(adapter); ixgb_irq_enable(adapter);
return 0; return 0;
} }
......
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