aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/emulex
diff options
context:
space:
mode:
authorSathya Perla <sathya.perla@emulex.com>2011-10-23 22:45:02 -0400
committerDavid S. Miller <davem@davemloft.net>2011-10-24 18:40:14 -0400
commitdafc0fe3afa565c88e44f1c243a49ce209f78ba7 (patch)
tree60b9819811ea30fe3dea7907dd20687ca3ed15a8 /drivers/net/ethernet/emulex
parentf9449ab76805a2f0e739f5e85a6d9e32d089f1b2 (diff)
be2net: don't create multiple TXQs in BE2
Multiple TXQ support is partially broken in BE2. It is fully supported BE3 onwards and in Lancer. Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/emulex')
-rw-r--r--drivers/net/ethernet/emulex/benet/be_main.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index d32e3787beb4..555b0ec3fe5f 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -1633,6 +1633,17 @@ static void be_tx_queues_destroy(struct be_adapter *adapter)
1633 be_queue_free(adapter, q); 1633 be_queue_free(adapter, q);
1634} 1634}
1635 1635
1636static int be_num_txqs_want(struct be_adapter *adapter)
1637{
1638 if ((num_vfs && adapter->sriov_enabled) ||
1639 (adapter->function_mode & 0x400) ||
1640 lancer_chip(adapter) || !be_physfn(adapter) ||
1641 adapter->generation == BE_GEN2)
1642 return 1;
1643 else
1644 return MAX_TX_QS;
1645}
1646
1636/* One TX event queue is shared by all TX compl qs */ 1647/* One TX event queue is shared by all TX compl qs */
1637static int be_tx_queues_create(struct be_adapter *adapter) 1648static int be_tx_queues_create(struct be_adapter *adapter)
1638{ 1649{
@@ -1640,6 +1651,11 @@ static int be_tx_queues_create(struct be_adapter *adapter)
1640 struct be_tx_obj *txo; 1651 struct be_tx_obj *txo;
1641 u8 i; 1652 u8 i;
1642 1653
1654 adapter->num_tx_qs = be_num_txqs_want(adapter);
1655 if (adapter->num_tx_qs != MAX_TX_QS)
1656 netif_set_real_num_tx_queues(adapter->netdev,
1657 adapter->num_tx_qs);
1658
1643 adapter->tx_eq.max_eqd = 0; 1659 adapter->tx_eq.max_eqd = 0;
1644 adapter->tx_eq.min_eqd = 0; 1660 adapter->tx_eq.min_eqd = 0;
1645 adapter->tx_eq.cur_eqd = 96; 1661 adapter->tx_eq.cur_eqd = 96;
@@ -3180,16 +3196,6 @@ static int be_get_config(struct be_adapter *adapter)
3180 if (status) 3196 if (status)
3181 return status; 3197 return status;
3182 3198
3183 if ((num_vfs && adapter->sriov_enabled) ||
3184 (adapter->function_mode & 0x400) ||
3185 lancer_chip(adapter) || !be_physfn(adapter)) {
3186 adapter->num_tx_qs = 1;
3187 netif_set_real_num_tx_queues(adapter->netdev,
3188 adapter->num_tx_qs);
3189 } else {
3190 adapter->num_tx_qs = MAX_TX_QS;
3191 }
3192
3193 return 0; 3199 return 0;
3194} 3200}
3195 3201