ice: ethtool: advertise 1000M speeds properly
authorAnatolii Gerasymenko <anatolii.gerasymenko@intel.com>
Mon, 20 Jun 2022 07:47:05 +0000 (09:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Jun 2022 07:03:25 +0000 (09:03 +0200)
commit20229bb9954586fdef301f8db78d32fed7d6bcb2
tree2dfa4d4ad8f0445fbcef3b6355e7628a1eb226f2
parent2b2bba96526f25f2eba74ecadb031de2e05a83ce
ice: ethtool: advertise 1000M speeds properly

[ Upstream commit c3d184c83ff4b80167e34edfc3d21df424bf27ff ]

In current implementation ice_update_phy_type enables all link modes
for selected speed. This approach doesn't work for 1000M speeds,
because both copper (1000baseT) and optical (1000baseX) standards
cannot be enabled at once.

Fix this, by adding the function `ice_set_phy_type_from_speed()`
for 1000M speeds.

Fixes: 48cb27f2fd18 ("ice: Implement handlers for ethtool PHY/link operations")
Signed-off-by: Anatolii Gerasymenko <anatolii.gerasymenko@intel.com>
Tested-by: Gurucharan <gurucharanx.g@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/intel/ice/ice_ethtool.c