diff options
author | Suresh Reddy <Suresh.Reddy@emulex.com> | 2014-09-02 09:56:57 +0530 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-09-02 12:46:00 -0700 |
commit | a28277dc65f4f7a58db899ab69acd8cf078b9039 (patch) | |
tree | d6607b00beef9aa8f24d90812b8aa9ea07d57d71 /drivers/net/ethernet/emulex | |
parent | a4906ea0a5fe6dba89d3809f1e0e97b4d55ef4b7 (diff) | |
download | blackbird-op-linux-a28277dc65f4f7a58db899ab69acd8cf078b9039.tar.gz blackbird-op-linux-a28277dc65f4f7a58db899ab69acd8cf078b9039.zip |
be2net: query max_tx_qs for BE3 super-nic profile from FW
In the BE3 super-nic profile, the max_tx_qs value can vary for each function.
So the driver needs to query this value from FW instead of using the
pre-defined constant BE3_MAX_TX_QS.
Signed-off-by: Suresh Reddy <Suresh.Reddy@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.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c index 1b1fbbfcf3ad..5b26c4c9ab2b 100644 --- a/drivers/net/ethernet/emulex/benet/be_main.c +++ b/drivers/net/ethernet/emulex/benet/be_main.c @@ -3324,10 +3324,20 @@ static void BEx_get_resources(struct be_adapter *adapter, */ if (BE2_chip(adapter) || use_sriov || (adapter->port_num > 1) || !be_physfn(adapter) || (be_is_mc(adapter) && - !(adapter->function_caps & BE_FUNCTION_CAPS_RSS))) + !(adapter->function_caps & BE_FUNCTION_CAPS_RSS))) { res->max_tx_qs = 1; - else + } else if (adapter->function_caps & BE_FUNCTION_CAPS_SUPER_NIC) { + struct be_resources super_nic_res = {0}; + + /* On a SuperNIC profile, the driver needs to use the + * GET_PROFILE_CONFIG cmd to query the per-function TXQ limits + */ + be_cmd_get_profile_config(adapter, &super_nic_res, 0); + /* Some old versions of BE3 FW don't report max_tx_qs value */ + res->max_tx_qs = super_nic_res.max_tx_qs ? : BE3_MAX_TX_QS; + } else { res->max_tx_qs = BE3_MAX_TX_QS; + } if ((adapter->function_caps & BE_FUNCTION_CAPS_RSS) && !use_sriov && be_physfn(adapter)) |