summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/iavf/iavf_main.c
diff options
context:
space:
mode:
authorBrett Creeley <brett.creeley@intel.com>2020-06-05 10:09:45 -0700
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2020-06-11 15:11:42 -0700
commit18c012d922620bb35ff2ab6838f1269bc12cf647 (patch)
treea5bb64f52f8acb582ee632eead0b3a3d44ea4077 /drivers/net/ethernet/intel/iavf/iavf_main.c
parent5071bda2947f61da0b1c271cf0b16be45c9b81e9 (diff)
iavf: Fix reporting 2.5 Gb and 5Gb speeds
Commit 4ae4916b5643 ("i40e: fix 'Unknown bps' in dmesg for 2.5Gb/5Gb speeds") added the ability for the PF to report 2.5 and 5Gb speeds, however, the iavf driver does not recognize those speeds as the values were not added there. Add the proper enums and values so that iavf can properly deal with those speeds. Fixes: 4ae4916b5643 ("i40e: fix 'Unknown bps' in dmesg for 2.5Gb/5Gb speeds") Signed-off-by: Brett Creeley <brett.creeley@intel.com> Signed-off-by: Witold Fijalkowski <witoldx.fijalkowski@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/iavf/iavf_main.c')
-rw-r--r--drivers/net/ethernet/intel/iavf/iavf_main.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
index 922f20962a29..06c481e9ac5c 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_main.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
@@ -2499,22 +2499,28 @@ static int iavf_validate_tx_bandwidth(struct iavf_adapter *adapter,
switch (adapter->link_speed) {
case VIRTCHNL_LINK_SPEED_40GB:
- speed = 40000;
+ speed = SPEED_40000;
break;
case VIRTCHNL_LINK_SPEED_25GB:
- speed = 25000;
+ speed = SPEED_25000;
break;
case VIRTCHNL_LINK_SPEED_20GB:
- speed = 20000;
+ speed = SPEED_20000;
break;
case VIRTCHNL_LINK_SPEED_10GB:
- speed = 10000;
+ speed = SPEED_10000;
+ break;
+ case VIRTCHNL_LINK_SPEED_5GB:
+ speed = SPEED_5000;
+ break;
+ case VIRTCHNL_LINK_SPEED_2_5GB:
+ speed = SPEED_2500;
break;
case VIRTCHNL_LINK_SPEED_1GB:
- speed = 1000;
+ speed = SPEED_1000;
break;
case VIRTCHNL_LINK_SPEED_100MB:
- speed = 100;
+ speed = SPEED_100;
break;
default:
break;