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>
This commit is contained in:
Sathya Perla 2011-10-24 02:45:02 +00:00 committed by David S. Miller
parent f9449ab768
commit dafc0fe3af
1 changed files with 16 additions and 10 deletions

View File

@ -1633,6 +1633,17 @@ static void be_tx_queues_destroy(struct be_adapter *adapter)
be_queue_free(adapter, q);
}
static int be_num_txqs_want(struct be_adapter *adapter)
{
if ((num_vfs && adapter->sriov_enabled) ||
(adapter->function_mode & 0x400) ||
lancer_chip(adapter) || !be_physfn(adapter) ||
adapter->generation == BE_GEN2)
return 1;
else
return MAX_TX_QS;
}
/* One TX event queue is shared by all TX compl qs */
static int be_tx_queues_create(struct be_adapter *adapter)
{
@ -1640,6 +1651,11 @@ static int be_tx_queues_create(struct be_adapter *adapter)
struct be_tx_obj *txo;
u8 i;
adapter->num_tx_qs = be_num_txqs_want(adapter);
if (adapter->num_tx_qs != MAX_TX_QS)
netif_set_real_num_tx_queues(adapter->netdev,
adapter->num_tx_qs);
adapter->tx_eq.max_eqd = 0;
adapter->tx_eq.min_eqd = 0;
adapter->tx_eq.cur_eqd = 96;
@ -3180,16 +3196,6 @@ static int be_get_config(struct be_adapter *adapter)
if (status)
return status;
if ((num_vfs && adapter->sriov_enabled) ||
(adapter->function_mode & 0x400) ||
lancer_chip(adapter) || !be_physfn(adapter)) {
adapter->num_tx_qs = 1;
netif_set_real_num_tx_queues(adapter->netdev,
adapter->num_tx_qs);
} else {
adapter->num_tx_qs = MAX_TX_QS;
}
return 0;
}