summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMitch Williams <mitch.a.williams@intel.com>2015-06-04 16:24:00 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2015-07-23 05:29:17 -0700
commit606a5488a18788c374e797643678a3c82621bf59 (patch)
tree231ee6c244c041e19608e1dae2fef164edf79c71 /drivers
parentee1693e5a5ad6cfd701381a1d04cc1878bb90724 (diff)
downloadlinux-606a5488a18788c374e797643678a3c82621bf59.tar.bz2
i40e: provide correct API version to older VF drivers
This driver fully supports VF drivers using both the 1.0 and 1.1 versions of the virtual channel API. However, VF drivers using version 1.0 get upset if we provide them with a version other than that, and refuse to play with us. Correct this by checking the VFs API version at the time that we store it off, and provide the correct version number back to the VF so we can all get along. Change-ID: I86dfe02e67b2bef336b4b49a1bb072f3e7229abc Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
index 176a2898f1ad..51aff7072195 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
@@ -1128,6 +1128,9 @@ static int i40e_vc_get_version_msg(struct i40e_vf *vf, u8 *msg)
};
vf->vf_ver = *(struct i40e_virtchnl_version_info *)msg;
+ /* VFs running the 1.0 API expect to get 1.0 back or they will cry. */
+ if (VF_IS_V10(vf))
+ info.minor = I40E_VIRTCHNL_VERSION_MINOR_NO_VF_CAPS;
return i40e_vc_send_msg_to_vf(vf, I40E_VIRTCHNL_OP_VERSION,
I40E_SUCCESS, (u8 *)&info,
sizeof(struct