diff options
| author | Lihong Yang <lihong.yang@intel.com> | 2019-06-05 15:45:15 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2019-06-05 19:53:25 -0400 |
| commit | 745b32c1a3faddbc5b96aade83c677454401f2e6 (patch) | |
| tree | 9be07f1931bdb7594594e5a5099197b6af9c1d0c | |
| parent | 55426f47d05ecf51bd8dff97fb8b4f73c0382577 (diff) | |
i40e: Do not check VF state in i40e_ndo_get_vf_config
The VF configuration returned in i40e_ndo_get_vf_config is
already stored by the PF. There is no dependency on any
specific state of the VF to return the configuration.
Drop the check against I40E_VF_STATE_INIT since it is not
needed.
Signed-off-by: Lihong Yang <lihong.yang@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
| -rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c index 479bc60c8f71..f14367834318 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | |||
| @@ -4302,10 +4302,8 @@ int i40e_ndo_get_vf_config(struct net_device *netdev, | |||
| 4302 | vf = &pf->vf[vf_id]; | 4302 | vf = &pf->vf[vf_id]; |
| 4303 | /* first vsi is always the LAN vsi */ | 4303 | /* first vsi is always the LAN vsi */ |
| 4304 | vsi = pf->vsi[vf->lan_vsi_idx]; | 4304 | vsi = pf->vsi[vf->lan_vsi_idx]; |
| 4305 | if (!test_bit(I40E_VF_STATE_INIT, &vf->vf_states)) { | 4305 | if (!vsi) { |
| 4306 | dev_err(&pf->pdev->dev, "VF %d still in reset. Try again.\n", | 4306 | ret = -ENOENT; |
| 4307 | vf_id); | ||
| 4308 | ret = -EAGAIN; | ||
| 4309 | goto error_param; | 4307 | goto error_param; |
| 4310 | } | 4308 | } |
| 4311 | 4309 | ||
