Skip to content

Commit

Permalink
i40e: clear __I40E_VIRTCHNL_OP_PENDING on invalid min Tx rate
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stefan Assmann authored and Jeff Kirsher committed Sep 11, 2019
1 parent 846fcc7 commit 8ad2e29
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 8ad2e29

Please sign in to comment.