igc: fix link speed advertising
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Dvora Fuxbrumer
Tested-byQuoted 16 lines
-------- Forwarded Message --------
Subject: Re: [Fwd: igc: fix link speed advertising]
Date: Wed, 27 Jan 2021 10:24:21 +0100
From: Corinna Vinschen <[email protected]>
To: Yang, Lihong <[email protected]>
CC: Pathi, Pragyansri <[email protected]>, Don Bayly <[email protected]>, Neftin, Sasha <[email protected]>, Nguyen, Anthony L <[email protected]>Hi Lihong,
Hi Tony,
Quoted 178 lines
Thanks a lot to both of you!
Corinna
Quoted 170 lines · Lihong
Hi Corinna,
A quick update. Your patch[1] was just sent by Tony to net as part of the bug-fix series. Hopefully it will be accepted soon. Thanks,
Lihong[1]
https://patchwork.kernel.org/project/netdevbpf/patch/20210126221035.658124-8-anthony.l.nguyen at intel.com/Quoted 10 lines
-----Original Message-----
From: Yang, Lihong
Sent: Tuesday, January 26, 2021 11:02 AM
To: Corinna Vinschen <[email protected]>
Cc: Pathi, Pragyansri <[email protected]>; Don Bayly <[email protected]>; Neftin, Sasha <[email protected]>; Nguyen, Anthony L <[email protected]>
Subject: RE: [Fwd: igc: fix link speed advertising]Quoted 2 lines
Hi Corinna,
From the info I gathered, the reason your patch has not been sentLinux
Quoted 1 line
upstream is because it has not been validated from Intel side. Once
it is
Quoted 2 lines
tagged with a Tested-by, it should be ready to go up.
Quoted 1 line
I am adding Sasha from the igc driver team to be aware of your
inquiry,
Quoted 16 lines
and Tony our Networking maintainer as an FYI.
Quoted 1 line
Thanks,
Lihong
Quoted 13 lines
Quoted 1 line
-----Original Message-----
From: Corinna Vinschen <[email protected]>
Sent: Tuesday, January 26, 2021 02:37 AM
To: Yang, Lihong <[email protected]>
Subject: [Fwd: igc: fix link speed advertising]Hi Lihong,
I sent this patch to the Intel-wired-lan and netdev mailing lists in November already.? I got no reply but it looked like it had been included into the test runs from the "kernel test robot" output.
So I expected this is going upstream for the next kernel version,
but it
Quoted 7 lines
Quoted 7 lines
didn't make it into net-next yet.? I was hoping this can go into RHEL 8.4, but it's getting really late now.
I pinged the mailing lists again, but, would you mind to check internally, if there's some reason not to include it?
Quoted 5 lines
Quoted 5 lines
Thanks a lot!
Corinna----- Forwarded message from Corinna Vinschen
<[email protected]> ----
Quoted 13 lines
-
Quoted 12 lines
Quoted 9 lines
Date: Tue, 17 Nov 2020 20:50:40 +0100
From: Corinna Vinschen <[email protected]>
To: intel-wired-lan at lists.osuosl.org, netdev at vger.kernel.org
Subject: [Intel-wired-lan] igc: fix link speed advertisingLink speed advertising in igc has two problems:
- When setting the advertisement via ethtool, the link speed is
converted
Quoted 2 lines
?? to the legacy 32 bit representation for the intel PHY code. ?? This inadvertently drops
ETHTOOL_LINK_MODE_2500baseT_Full_BIT(being
Quoted 1 line
Quoted 1 line
Quoted 1 line
?? beyond bit 31).? As a result, any call to `ethtool -s ...'
drops the
Quoted 5 lines
Quoted 5 lines
Quoted 1 line
?? 2500Mbit/s link speed from the PHY settings.? Only reloading the
driver
Quoted 3 lines
?? alleviates that problem.
?? Fix this by converting the
ETHTOOL_LINK_MODE_2500baseT_Full_BITtoQuoted 4 lines
the
Quoted 3 lines
Quoted 3 lines
?? Intel PHY
ADVERTISE_2500_FULLbit explicitely.- Rather than checking the actual PHY setting, the
.get_link_ksettings
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
?? function always fills link_modes.advertising with all link speeds ?? the device is capable of.
?? Fix this by checking the PHY
autoneg_advertisedsettings andreport
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
?? only the actually advertised speeds up to ethtool.
Signed-off-by Corinna Vinschen <[email protected]>---
?drivers/net/ethernet/intel/igc/igc_ethtool.c| 24+++++++++++++++----
Quoted 15 lines
-
Quoted 8 lines
Review
Quoted 3 lines
? 1 file changed, 18 insertions(+), 6 deletions(-)
(quoted diff) +0
-0
b/drivers/net/ethernet/intel/igc/igc_ethtool.cdrivers/net/ethernet/intel/igc/igc_ethtool.c static int
Quoted 4 lines
index
61d331ce38cd..75cb4ca36bac100644drivers/net/ethernet/intel/igc/igc_ethtool.c +0
-0@@ -1675,12 +1675,18 @@ static intigc_ethtool_get_link_ksettings(struct
Quoted 5 lines
net_device*netdev,Quoted 4 lines
drivers/net/ethernet/intel/igc/igc_ethtool.c +0
-0????? cmd->base.phy_address = hw->phy.addr;????? /* advertising link modes */
-??? ethtool_link_ksettings_add_link_mode(cmd, advertising,10baseT_Half);
Quoted 1 line
Quoted 1 line
Quoted 1 line
-??? ethtool_link_ksettings_add_link_mode(cmd, advertising,
10baseT_Full);
Quoted 55 lines
Quoted 22 lines
Quoted 1 line
-??? ethtool_link_ksettings_add_link_mode(cmd, advertising,
100baseT_Half);
Quoted 1 line
-??? ethtool_link_ksettings_add_link_mode(cmd, advertising,
100baseT_Full);
Quoted 1 line
-??? ethtool_link_ksettings_add_link_mode(cmd, advertising,
1000baseT_Full);
Quoted 1 line
-??? ethtool_link_ksettings_add_link_mode(cmd, advertising,
2500baseT_Full);
Quoted 2 lines
+??? if (
hw->phy.autoneg_advertised&ADVERTISE_10_HALF) +??????? ethtool_link_ksettings_add_link_mode(cmd, advertising,10baseT_Half);
Quoted 2 lines
+??? if (
hw->phy.autoneg_advertised&ADVERTISE_10_FULL) +??????? ethtool_link_ksettings_add_link_mode(cmd, advertising,10baseT_Full);
Quoted 2 lines
+??? if (
hw->phy.autoneg_advertised&ADVERTISE_100_HALF) +??????? ethtool_link_ksettings_add_link_mode(cmd, advertising,100baseT_Half);
Quoted 2 lines
+??? if (
hw->phy.autoneg_advertised&ADVERTISE_100_FULL) +??????? ethtool_link_ksettings_add_link_mode(cmd, advertising,100baseT_Full);
Quoted 2 lines
+??? if (
hw->phy.autoneg_advertised&ADVERTISE_1000_FULL) +??????? ethtool_link_ksettings_add_link_mode(cmd, advertising,Quoted 8 lines
1000baseT_Full);
Quoted 2 lines
+??? if (
hw->phy.autoneg_advertised&ADVERTISE_2500_FULL) +??????? ethtool_link_ksettings_add_link_mode(cmd, advertising,2500baseT_Full);
drivers/net/ethernet/intel/igc/igc_ethtool.c igc_ethtool_set_link_ksettings(struct
Quoted 4 lines
????? /* set autoneg settings */
????? if (hw->mac.autoneg== 1) {drivers/net/ethernet/intel/igc/igc_ethtool.c +0
-0@@ -1792,6 +1798,12 @@ igc_ethtool_set_link_ksettings(struct
net_deviceQuoted 24 lines
*netdev,
drivers/net/ethernet/intel/igc/igc_ethtool.c igc_ethtool_set_link_ksettings(struct · line 1800
Quoted 4 lines
drivers/net/ethernet/intel/igc/igc_ethtool.c +1
-0????? ethtool_convert_link_mode_to_legacy_u32(&advertising, ????????????????????????? cmd->link_modes.advertising); +??? /* Converting to legacy u32 drops
ETHTOOL_LINK_MODE_2500baseT_Full_BIT.drivers/net/ethernet/intel/igc/igc_ethtool.c igc_ethtool_set_link_ksettings(struct · line 1804
Quoted 4 lines
drivers/net/ethernet/intel/igc/igc_ethtool.c +4
-0+???? * We have to check this and convert it to ADVERTISE_2500_FULL +???? * (aka ETHTOOL_LINK_MODE_2500baseX_Full_BIT) explicitely. +???? */ +??? if (ethtool_link_ksettings_test_link_mode(cmd, advertising,2500baseT_Full))
Quoted 11 lines
drivers/net/ethernet/intel/igc/igc_ethtool.c +1
-1+??????? advertising |= ADVERTISE_2500_FULL; ????? if (cmd->base.autoneg == AUTONEG_ENABLE) { ????????? hw->mac.autoneg = 1; --2.27.0
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan at osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan----- End forwarded message -----
Dvora Fuxbrumer
Tested-byQuoted 15 lines
-------- Forwarded Message --------
Subject: Re: [Fwd: igc: fix link speed advertising]
Date: Wed, 27 Jan 2021 10:24:21 +0100
From: Corinna Vinschen <[email protected]>
To: Yang, Lihong <[email protected]>
CC: Pathi, Pragyansri <[email protected]>, Don Bayly <[email protected]>, Neftin, Sasha <[email protected]>, Nguyen, Anthony L <[email protected]>Hi Lihong,
Hi Tony,
Quoted 178 lines
Thanks a lot to both of you!
Corinna
Quoted 170 lines · Lihong
Hi Corinna,
A quick update. Your patch[1] was just sent by Tony to net as part of the bug-fix series. Hopefully it will be accepted soon. Thanks,
Lihong[1]
https://patchwork.kernel.org/project/netdevbpf/patch/20210126221035.658124-8-anthony.l.nguyen at intel.com/Quoted 10 lines
-----Original Message-----
From: Yang, Lihong
Sent: Tuesday, January 26, 2021 11:02 AM
To: Corinna Vinschen <[email protected]>
Cc: Pathi, Pragyansri <[email protected]>; Don Bayly <[email protected]>; Neftin, Sasha <[email protected]>; Nguyen, Anthony L <[email protected]>
Subject: RE: [Fwd: igc: fix link speed advertising]Quoted 2 lines
Hi Corinna,
From the info I gathered, the reason your patch has not been sentLinux
Quoted 1 line
upstream is because it has not been validated from Intel side. Once
it is
Quoted 2 lines
tagged with a Tested-by, it should be ready to go up.
Quoted 1 line
I am adding Sasha from the igc driver team to be aware of your
inquiry,
Quoted 16 lines
and Tony our Networking maintainer as an FYI.
Quoted 1 line
Thanks,
Lihong
Quoted 13 lines
Quoted 1 line
-----Original Message-----
From: Corinna Vinschen <[email protected]>
Sent: Tuesday, January 26, 2021 02:37 AM
To: Yang, Lihong <[email protected]>
Subject: [Fwd: igc: fix link speed advertising]Hi Lihong,
I sent this patch to the Intel-wired-lan and netdev mailing lists in November already.? I got no reply but it looked like it had been included into the test runs from the "kernel test robot" output.
So I expected this is going upstream for the next kernel version,
but it
Quoted 7 lines
Quoted 7 lines
didn't make it into net-next yet.? I was hoping this can go into RHEL 8.4, but it's getting really late now.
I pinged the mailing lists again, but, would you mind to check internally, if there's some reason not to include it?
Quoted 5 lines
Quoted 5 lines
Thanks a lot!
Corinna----- Forwarded message from Corinna Vinschen
<[email protected]> ----
Quoted 13 lines
-
Quoted 12 lines
Quoted 9 lines
Date: Tue, 17 Nov 2020 20:50:40 +0100
From: Corinna Vinschen <[email protected]>
To: intel-wired-lan at lists.osuosl.org, netdev at vger.kernel.org
Subject: [Intel-wired-lan] igc: fix link speed advertisingLink speed advertising in igc has two problems:
- When setting the advertisement via ethtool, the link speed is
converted
Quoted 2 lines
?? to the legacy 32 bit representation for the intel PHY code. ?? This inadvertently drops
ETHTOOL_LINK_MODE_2500baseT_Full_BIT(being
Quoted 1 line
Quoted 1 line
Quoted 1 line
?? beyond bit 31).? As a result, any call to `ethtool -s ...'
drops the
Quoted 5 lines
Quoted 5 lines
Quoted 1 line
?? 2500Mbit/s link speed from the PHY settings.? Only reloading the
driver
Quoted 3 lines
?? alleviates that problem.
?? Fix this by converting the
ETHTOOL_LINK_MODE_2500baseT_Full_BITtoQuoted 4 lines
the
Quoted 3 lines
Quoted 3 lines
?? Intel PHY
ADVERTISE_2500_FULLbit explicitely.- Rather than checking the actual PHY setting, the
.get_link_ksettings
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
?? function always fills link_modes.advertising with all link speeds ?? the device is capable of.
?? Fix this by checking the PHY
autoneg_advertisedsettings andreport
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
?? only the actually advertised speeds up to ethtool.
Signed-off-by Corinna Vinschen <[email protected]>---
?drivers/net/ethernet/intel/igc/igc_ethtool.c| 24+++++++++++++++----
Quoted 15 lines
-
Quoted 8 lines
Review
Quoted 3 lines
? 1 file changed, 18 insertions(+), 6 deletions(-)
(quoted diff) +0
-0
b/drivers/net/ethernet/intel/igc/igc_ethtool.cdrivers/net/ethernet/intel/igc/igc_ethtool.c static int
Quoted 4 lines
index
61d331ce38cd..75cb4ca36bac100644drivers/net/ethernet/intel/igc/igc_ethtool.c +0
-0@@ -1675,12 +1675,18 @@ static intigc_ethtool_get_link_ksettings(struct
Quoted 5 lines
net_device*netdev,Quoted 4 lines
drivers/net/ethernet/intel/igc/igc_ethtool.c +0
-0????? cmd->base.phy_address = hw->phy.addr;????? /* advertising link modes */
-??? ethtool_link_ksettings_add_link_mode(cmd, advertising,10baseT_Half);
Quoted 1 line
Quoted 1 line
Quoted 1 line
-??? ethtool_link_ksettings_add_link_mode(cmd, advertising,
10baseT_Full);
Quoted 55 lines
Quoted 22 lines
Quoted 1 line
-??? ethtool_link_ksettings_add_link_mode(cmd, advertising,
100baseT_Half);
Quoted 1 line
-??? ethtool_link_ksettings_add_link_mode(cmd, advertising,
100baseT_Full);
Quoted 1 line
-??? ethtool_link_ksettings_add_link_mode(cmd, advertising,
1000baseT_Full);
Quoted 1 line
-??? ethtool_link_ksettings_add_link_mode(cmd, advertising,
2500baseT_Full);
Quoted 2 lines
+??? if (
hw->phy.autoneg_advertised&ADVERTISE_10_HALF) +??????? ethtool_link_ksettings_add_link_mode(cmd, advertising,10baseT_Half);
Quoted 2 lines
+??? if (
hw->phy.autoneg_advertised&ADVERTISE_10_FULL) +??????? ethtool_link_ksettings_add_link_mode(cmd, advertising,10baseT_Full);
Quoted 2 lines
+??? if (
hw->phy.autoneg_advertised&ADVERTISE_100_HALF) +??????? ethtool_link_ksettings_add_link_mode(cmd, advertising,100baseT_Half);
Quoted 2 lines
+??? if (
hw->phy.autoneg_advertised&ADVERTISE_100_FULL) +??????? ethtool_link_ksettings_add_link_mode(cmd, advertising,100baseT_Full);
Quoted 2 lines
+??? if (
hw->phy.autoneg_advertised&ADVERTISE_1000_FULL) +??????? ethtool_link_ksettings_add_link_mode(cmd, advertising,Quoted 8 lines
1000baseT_Full);
Quoted 2 lines
+??? if (
hw->phy.autoneg_advertised&ADVERTISE_2500_FULL) +??????? ethtool_link_ksettings_add_link_mode(cmd, advertising,2500baseT_Full);
drivers/net/ethernet/intel/igc/igc_ethtool.c igc_ethtool_set_link_ksettings(struct
Quoted 4 lines
????? /* set autoneg settings */
????? if (hw->mac.autoneg== 1) {drivers/net/ethernet/intel/igc/igc_ethtool.c +0
-0@@ -1792,6 +1798,12 @@ igc_ethtool_set_link_ksettings(struct
net_deviceQuoted 24 lines
*netdev,
drivers/net/ethernet/intel/igc/igc_ethtool.c igc_ethtool_set_link_ksettings(struct · line 1800
Quoted 4 lines
drivers/net/ethernet/intel/igc/igc_ethtool.c +1
-0????? ethtool_convert_link_mode_to_legacy_u32(&advertising, ????????????????????????? cmd->link_modes.advertising); +??? /* Converting to legacy u32 drops
ETHTOOL_LINK_MODE_2500baseT_Full_BIT.drivers/net/ethernet/intel/igc/igc_ethtool.c igc_ethtool_set_link_ksettings(struct · line 1804
Quoted 4 lines
drivers/net/ethernet/intel/igc/igc_ethtool.c +4
-0+???? * We have to check this and convert it to ADVERTISE_2500_FULL +???? * (aka ETHTOOL_LINK_MODE_2500baseX_Full_BIT) explicitely. +???? */ +??? if (ethtool_link_ksettings_test_link_mode(cmd, advertising,2500baseT_Full))
Quoted 11 lines
drivers/net/ethernet/intel/igc/igc_ethtool.c +1
-1+??????? advertising |= ADVERTISE_2500_FULL; ????? if (cmd->base.autoneg == AUTONEG_ENABLE) { ????????? hw->mac.autoneg = 1; --2.27.0
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan at osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan----- End forwarded message -----