From: Mitch Williams Date: Wed, 23 Dec 2015 20:05:49 +0000 (-0800) Subject: i40e: add 20G speed for Tx bandwidth calculations X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=07f169c3e9df898afe951d74734a0e54ac89ee9d;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git i40e: add 20G speed for Tx bandwidth calculations When calculating TX bandwidth for VFs, we need to know the link speed to make sure we don't allocate more bandwidth than is available. Add 20G link speed to the switch statement so we can support devices that link at that speed. Change-ID: I5409f6139d549e5832777db9c22ca0664e0c5f8b Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c index 659d78270fdb..1635c7a0e505 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c @@ -2306,6 +2306,9 @@ int i40e_ndo_set_vf_bw(struct net_device *netdev, int vf_id, int min_tx_rate, case I40E_LINK_SPEED_40GB: speed = 40000; break; + case I40E_LINK_SPEED_20GB: + speed = 20000; + break; case I40E_LINK_SPEED_10GB: speed = 10000; break;