]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ice: Fix curr_link_speed advertised speed
authorJedrzej Jagielski <jedrzej.jagielski@intel.com>
Tue, 22 Feb 2022 11:43:04 +0000 (11:43 +0000)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 8 Mar 2022 21:31:09 +0000 (13:31 -0800)
Change curr_link_speed advertised speed, due to
link_info.link_speed is not equal phy.curr_user_speed_req.
Without this patch it is impossible to set advertised
speed to same as link_speed.

Testing Hints: Try to set advertised speed
to 25G only with 25G default link (use ethtool -s 0x80000000)

Fixes: 6a4fe288293f ("ice: Implement handlers for ethtool PHY/link operations")
Signed-off-by: Grzegorz Siwik <grzegorz.siwik@intel.com>
Signed-off-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com>
Tested-by: Gurucharan <gurucharanx.g@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_ethtool.c

index e2e3ef7fba7fc217768548f235a71f47c6c729cf..a5dc9824e255e820b2748606735dcb341f20589a 100644 (file)
@@ -2298,7 +2298,7 @@ ice_set_link_ksettings(struct net_device *netdev,
        if (err)
                goto done;
 
-       curr_link_speed = pi->phy.link_info.link_speed;
+       curr_link_speed = pi->phy.curr_user_speed_req;
        adv_link_speed = ice_ksettings_find_adv_link_speed(ks);
 
        /* If speed didn't get set, set it to what it currently is.