1
0
Fork 0

i40e: clear __I40E_VIRTCHNL_OP_PENDING on invalid min Tx rate

In the case of an invalid min Tx rate being requested
i40e_ndo_set_vf_bw() immediately returns -EINVAL instead of releasing
__I40E_VIRTCHNL_OP_PENDING first.

Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
alistair/sunxi64-5.4-dsi
Stefan Assmann 2019-09-03 08:08:10 +02:00 committed by Jeff Kirsher
parent 846fcc7841
commit 8ad2e29829
1 changed files with 2 additions and 1 deletions

View File

@ -4263,7 +4263,8 @@ int i40e_ndo_set_vf_bw(struct net_device *netdev, int vf_id, int min_tx_rate,
if (min_tx_rate) {
dev_err(&pf->pdev->dev, "Invalid min tx rate (%d) (greater than 0) specified for VF %d.\n",
min_tx_rate, vf_id);
return -EINVAL;
ret = -EINVAL;
goto error;
}
vf = &pf->vf[vf_id];