aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_main.c')
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 198b9d9a3d4c..99e0b34416e8 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -1417,18 +1417,23 @@ static void ixgbe_configure_srrctl(struct ixgbe_adapter *adapter, int index)
1417 struct ixgbe_ring *rx_ring; 1417 struct ixgbe_ring *rx_ring;
1418 u32 srrctl; 1418 u32 srrctl;
1419 int queue0; 1419 int queue0;
1420 unsigned long *mask, maskval = 1; 1420 unsigned long mask;
1421 long shift, len; 1421
1422 1422 /* program one srrctl register per VMDq index */
1423 if (adapter->flags & IXGBE_FLAG_RSS_ENABLED) { 1423 if (adapter->flags & IXGBE_FLAG_VMDQ_ENABLED) {
1424 mask = (unsigned long *) &adapter->ring_feature[RING_F_RSS].mask; 1424 long shift, len;
1425 len = sizeof(adapter->ring_feature[RING_F_RSS].mask) * 8; 1425 mask = (unsigned long) adapter->ring_feature[RING_F_RSS].mask;
1426 len = sizeof(adapter->ring_feature[RING_F_VMDQ].mask) * 8;
1427 shift = find_first_bit(&mask, len);
1428 queue0 = index & mask;
1429 index = (index & mask) >> shift;
1430 /* program one srrctl per RSS queue since RDRXCTL.MVMEN is enabled */
1426 } else { 1431 } else {
1427 mask = &maskval; 1432 mask = (unsigned long) adapter->ring_feature[RING_F_RSS].mask;
1428 len = 1; 1433 queue0 = index & mask;
1434 index = index & mask;
1429 } 1435 }
1430 shift = find_first_bit(mask, len); 1436
1431 queue0 = index << shift;
1432 rx_ring = &adapter->rx_ring[queue0]; 1437 rx_ring = &adapter->rx_ring[queue0];
1433 1438
1434 srrctl = IXGBE_READ_REG(&adapter->hw, IXGBE_SRRCTL(index)); 1439 srrctl = IXGBE_READ_REG(&adapter->hw, IXGBE_SRRCTL(index));