ice: Recognize higher speeds
authorAnirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tue, 16 Apr 2019 17:35:02 +0000 (10:35 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 30 May 2019 17:53:05 +0000 (10:53 -0700)
In ice_print_link_msg, add cases for 50GB and 100GB speeds. This
results in the right speed being reported on load, instead of
"Unknownbps".

When VF link if forced (in ice_set_pfe_link_forced), report
max speed 100GB.

Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ice/ice_main.c
drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c

index c8cf2c35ecbb0c55105f061741e5086e7483e94b..d34e2d5291651468e6fe3aaf802de44cb2be76f6 100644 (file)
@@ -645,6 +645,12 @@ void ice_print_link_msg(struct ice_vsi *vsi, bool isup)
        }
 
        switch (vsi->port_info->phy.link_info.link_speed) {
+       case ICE_AQ_LINK_SPEED_100GB:
+               speed = "100 G";
+               break;
+       case ICE_AQ_LINK_SPEED_50GB:
+               speed = "50 G";
+               break;
        case ICE_AQ_LINK_SPEED_40GB:
                speed = "40 G";
                break;
index ecbf447e558a2a2b23a7ac941305e0af8e361850..fff59ebf07cae52586524dc110de6a73c8719012 100644 (file)
@@ -103,7 +103,7 @@ ice_set_pfe_link_forced(struct ice_vf *vf, struct virtchnl_pf_event *pfe,
        u16 link_speed;
 
        if (link_up)
-               link_speed = ICE_AQ_LINK_SPEED_40GB;
+               link_speed = ICE_AQ_LINK_SPEED_100GB;
        else
                link_speed = ICE_AQ_LINK_SPEED_UNKNOWN;