Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ee1693e5 authored by Mitch Williams's avatar Mitch Williams Committed by Jeff Kirsher
Browse files

i40evf: support virtual channel API version 1.1



Store off the PF's API version, then use it to determine whether or not
to send it our capabilities. Change the version checking to allow for PF
drivers with lower API versions than our current version, so we can
still talk to PF drivers over the 1.0 API.

Change-ID: I8edc55d1229c7decf0ed3f285a63032694007c2e
Signed-off-by: default avatarMitch Williams <mitch.a.williams@intel.com>
Tested-by: default avatarJim young <james.m.young@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent e6d038de
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2113,6 +2113,12 @@ static void i40evf_init_task(struct work_struct *work)
		if (err) {
			if (err == I40E_ERR_ADMIN_QUEUE_NO_WORK)
				err = i40evf_send_api_ver(adapter);
			else
				dev_err(&pdev->dev, "Unsupported PF API version %d.%d, expected %d.%d\n",
					adapter->pf_version.major,
					adapter->pf_version.minor,
					I40E_VIRTCHNL_VERSION_MAJOR,
					I40E_VIRTCHNL_VERSION_MINOR);
			goto err;
		}
		err = i40evf_send_vf_config_msg(adapter);
+5 −2
Original line number Diff line number Diff line
@@ -125,8 +125,11 @@ int i40evf_verify_api_ver(struct i40evf_adapter *adapter)
	}

	pf_vvi = (struct i40e_virtchnl_version_info *)event.msg_buf;
	if ((pf_vvi->major != I40E_VIRTCHNL_VERSION_MAJOR) ||
	    (pf_vvi->minor != I40E_VIRTCHNL_VERSION_MINOR))
	adapter->pf_version = *pf_vvi;

	if ((pf_vvi->major > I40E_VIRTCHNL_VERSION_MAJOR) ||
	    ((pf_vvi->major == I40E_VIRTCHNL_VERSION_MAJOR) &&
	     (pf_vvi->minor > I40E_VIRTCHNL_VERSION_MINOR)))
		err = -EIO;

out_alloc: