Skip to content

Commit 606a548

Browse files
mawilli1Jeff Kirsher
authored andcommitted
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 <[email protected]> Tested-by: Jim Young <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent ee1693e commit 606a548

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,6 +1128,9 @@ static int i40e_vc_get_version_msg(struct i40e_vf *vf, u8 *msg)
11281128
};
11291129

11301130
vf->vf_ver = *(struct i40e_virtchnl_version_info *)msg;
1131+
/* VFs running the 1.0 API expect to get 1.0 back or they will cry. */
1132+
if (VF_IS_V10(vf))
1133+
info.minor = I40E_VIRTCHNL_VERSION_MINOR_NO_VF_CAPS;
11311134
return i40e_vc_send_msg_to_vf(vf, I40E_VIRTCHNL_OP_VERSION,
11321135
I40E_SUCCESS, (u8 *)&info,
11331136
sizeof(struct

0 commit comments

Comments
 (0)