diff options
author | Suresh Reddy <suresh.reddy@avagotech.com> | 2015-12-30 01:29:03 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-12-30 16:33:35 -0500 |
commit | 980df249bdab2adc8522d2178bfffceba79c5e6b (patch) | |
tree | d67f2d9facfbe677624d7a4255fde3e70b91d7ef /drivers/net/ethernet/emulex/benet/be.h | |
parent | 04e888de2d72b587f81a18e42cb9af2c020ef63b (diff) | |
download | op-kernel-dev-980df249bdab2adc8522d2178bfffceba79c5e6b.zip op-kernel-dev-980df249bdab2adc8522d2178bfffceba79c5e6b.tar.gz |
be2net: fix port-res desc query of GET_PROFILE_CONFIG FW cmd
Commit 72ef3a88fa8e ("be2net: set pci_func_num while issuing
GET_PROFILE_CONFIG cmd") passed a specific pf_num while issuing a
GET_PROFILE_CONFIG cmd as FW returns descriptors for all functions when
pf_num is zero. But, when pf_num is set to a non-zero value, FW does not
return the Port resource descriptor.
This patch fixes this by setting pf_num to 0 while issuing the query cmd
and adds code to pick the correct NIC resource descriptor from the list of
descriptors returned by FW.
Fixes: 72ef3a88fa8e ("be2net: set pci_func_num while issuing
GET_PROFILE_CONFIG cmd")
Signed-off-by: Suresh Reddy <suresh.reddy@avagotech.com>
Signed-off-by: Sathya Perla <sathya.perla@avagotech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/emulex/benet/be.h')
-rw-r--r-- | drivers/net/ethernet/emulex/benet/be.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be.h b/drivers/net/ethernet/emulex/benet/be.h index 0af32f1..66988f4 100644 --- a/drivers/net/ethernet/emulex/benet/be.h +++ b/drivers/net/ethernet/emulex/benet/be.h @@ -570,6 +570,8 @@ struct be_adapter { struct be_resources pool_res; /* resources available for the port */ struct be_resources res; /* resources available for the func */ u16 num_vfs; /* Number of VFs provisioned by PF */ + u8 pf_num; /* Numbering used by FW, starts at 0 */ + u8 vf_num; /* Numbering used by FW, starts at 1 */ u8 virtfn; struct be_vf_cfg *vf_cfg; bool be3_native; @@ -587,8 +589,6 @@ struct be_adapter { u32 msg_enable; int be_get_temp_freq; struct be_hwmon hwmon_info; - u8 pf_number; - u8 pci_func_num; struct rss_info rss_info; /* Filters for packets that need to be sent to BMC */ u32 bmc_filt_mask; |