aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/igb/igb_ethtool.c
diff options
context:
space:
mode:
authorAlexander Duyck <[email protected]>2011-08-26 07:46:03 +0000
committerJeff Kirsher <[email protected]>2011-10-08 05:49:19 +0000
commit3ceb90fd4898853cdac43084f0c6ee7270cb15f3 (patch)
tree97526ddf3e00da217061063a30fba616e982d4b5 /drivers/net/ethernet/intel/igb/igb_ethtool.c
parentigb: retire the RX_CSUM flag and use the netdev flag instead (diff)
downloadkernel-3ceb90fd4898853cdac43084f0c6ee7270cb15f3.tar.gz
kernel-3ceb90fd4898853cdac43084f0c6ee7270cb15f3.zip
igb: leave staterr in place and instead us a helper function to check bits
Instead of doing a byte swap on the staterr bits in the Rx descriptor we can save ourselves a bit of space and some CPU time by instead just testing for the various bits out of the Rx descriptor directly. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/igb/igb_ethtool.c')
-rw-r--r--drivers/net/ethernet/intel/igb/igb_ethtool.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c
index 5ebe992010d6..bc198ea2bc14 100644
--- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
+++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
@@ -1581,16 +1581,14 @@ static int igb_clean_test_rings(struct igb_ring *rx_ring,
union e1000_adv_rx_desc *rx_desc;
struct igb_rx_buffer *rx_buffer_info;
struct igb_tx_buffer *tx_buffer_info;
- u32 staterr;
u16 rx_ntc, tx_ntc, count = 0;
/* initialize next to clean and descriptor values */
rx_ntc = rx_ring->next_to_clean;
tx_ntc = tx_ring->next_to_clean;
rx_desc = IGB_RX_DESC(rx_ring, rx_ntc);
- staterr = le32_to_cpu(rx_desc->wb.upper.status_error);
- while (staterr & E1000_RXD_STAT_DD) {
+ while (igb_test_staterr(rx_desc, E1000_RXD_STAT_DD)) {
/* check rx buffer */
rx_buffer_info = &rx_ring->rx_buffer_info[rx_ntc];
@@ -1619,7 +1617,6 @@ static int igb_clean_test_rings(struct igb_ring *rx_ring,
/* fetch next descriptor */
rx_desc = IGB_RX_DESC(rx_ring, rx_ntc);
- staterr = le32_to_cpu(rx_desc->wb.upper.status_error);
}
/* re-map buffers to ring, store next to clean values */