Files
android_kernel_xiaomi_sm8450/drivers/net/ethernet/intel/igc
Corinna Vinschen 4c919b215b igc: fix link speed advertising
[ Upstream commit 329a3678ec69962aa67c91397efbd46d36635f91 ]

Link speed advertising in igc has two problems:

- When setting the advertisement via ethtool, the link speed is converted
  to the legacy 32 bit representation for the intel PHY code.
  This inadvertently drops ETHTOOL_LINK_MODE_2500baseT_Full_BIT (being
  beyond bit 31).  As a result, any call to `ethtool -s ...' drops the
  2500Mbit/s link speed from the PHY settings.  Only reloading the driver
  alleviates that problem.

  Fix this by converting the ETHTOOL_LINK_MODE_2500baseT_Full_BIT to the
  Intel PHY ADVERTISE_2500_FULL bit explicitly.

- Rather than checking the actual PHY setting, the .get_link_ksettings
  function always fills link_modes.advertising with all link speeds
  the device is capable of.

  Fix this by checking the PHY autoneg_advertised settings and report
  only the actually advertised speeds up to ethtool.

Fixes: 8c5ad0dae9 ("igc: Add ethtool support")
Signed-off-by: Corinna Vinschen <vinschen@redhat.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-02-03 23:28:48 +01:00
..
2020-09-28 14:42:45 -07:00
2020-05-19 16:00:00 -07:00
2021-02-03 23:28:48 +01:00
2020-09-28 14:42:46 -07:00
2020-06-29 18:21:09 -07:00
2020-06-29 18:21:09 -07:00
2020-07-27 08:49:32 -07:00
2020-05-19 15:01:48 -07:00
2020-11-10 15:03:14 -08:00
2018-10-17 13:52:00 -07:00
2018-10-17 13:52:00 -07:00
2018-10-17 13:56:55 -07:00
2020-04-17 10:19:24 -07:00
2020-09-28 14:42:46 -07:00