Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 266943
b: refs/heads/master
c: dafc0fe
h: refs/heads/master
i:
  266941: 96cda11
  266939: 7140ad0
  266935: 9311e31
  266927: ecd6321
  266911: e926f25
  266879: da3d851
v: v3
  • Loading branch information
Sathya Perla authored and David S. Miller committed Oct 24, 2011
1 parent 6635fdc commit d3e17b2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f9449ab76805a2f0e739f5e85a6d9e32d089f1b2
refs/heads/master: dafc0fe3afa565c88e44f1c243a49ce209f78ba7
26 changes: 16 additions & 10 deletions trunk/drivers/net/ethernet/emulex/benet/be_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1633,13 +1633,29 @@ 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)
{
struct be_queue_info *eq, *q, *cq;
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;
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit d3e17b2

Please sign in to comment.