Skip to contentSkip to conversation

igc: set TP bit in 'supported' and 'advertising' fields of ethtool_link_ksettings

PATCH Superseded Prasad Koya 4 participants 5 messages Jun 5, 2023 – Jun 21, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 igc: set TP bit in 'supported' and 'advertising' fields of ethtool_link_ksettings

set TP bit in the 'supported' and 'advertising' fields. I226 only supports twisted pair copper.

Fixes 8c5ad0dae93c9 ("igc: Add ethtool support")
---
 drivers/net/ethernet/intel/igc/igc_ethtool.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/ethernet/intel/igc/igc_ethtool.c +2 -0
index 8cc077b712ad..511fc3f41208 100644
@@ -1707,6 +1707,8 @@ static int igc_ethtool_get_link_ksettings(struct net_device *netdev,
 	/* twisted pair */
 	cmd->base.port = PORT_TP;
 	cmd->base.phy_address = hw->phy.addr;
+	ethtool_link_ksettings_add_link_mode(cmd, supported, TP);
+	ethtool_link_ksettings_add_link_mode(cmd, advertising, TP);
 
 	/* advertising link modes */
 	if (hw->phy.autoneg_advertised & ADVERTISE_10_HALF)
Signature · 6 lines
2.25.1

_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
Acked-by on v2 1/1
#1 lore raw
Quoted 1 line · Prasad Koya

set TP bit in the 'supported' and 'advertising' fields. I226 only supports twisted pair copper.

Minor correction: i225/226 parts (instead of I226).

Quoted 12 lines
Fixes 8c5ad0dae93c9 ("igc: Add ethtool support")
---
  drivers/net/ethernet/intel/igc/igc_ethtool.c | 2 ++
  1 file changed, 2 insertions(+)
drivers/net/ethernet/intel/igc/igc_ethtool.c +0 -0
index 8cc077b712ad..511fc3f41208 100644

drivers/net/ethernet/intel/igc/igc_ethtool.c static int igc_ethtool_get_link_ksettings(struct net_device *netdev, · line 1714

Quoted 8 lines
drivers/net/ethernet/intel/igc/igc_ethtool.c +2 -0
@@ -1707,6 +1707,8 @@ static int igc_ethtool_get_link_ksettings(struct net_device *netdev,
  	/* twisted pair */
  	cmd->base.port = PORT_TP;
  	cmd->base.phy_address = hw->phy.addr;
+	ethtool_link_ksettings_add_link_mode(cmd, supported, TP);
+	ethtool_link_ksettings_add_link_mode(cmd, advertising, TP);
 
  	/* advertising link modes */
  	if (hw->phy.autoneg_advertised & ADVERTISE_10_HALF)

_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

#2 lore raw
In reply to Prasad Koya

Dear Prasad,

Am 05.06.23 um 05:15 schrieb Prasad Koya:

Quoted 1 line

set TP bit in the 'supported' and 'advertising' fields. I226 only supports twisted pair copper.

Please wrap lines after 75 characters in commit messages.

Quoted 1 line
Fixes 8c5ad0dae93c9 ("igc: Add ethtool support")

scripts/checkpatch.pl says:

WARNING: Please use correct Fixes: style 'Fixes: <12 chars of sha1>
("<title line>")' - ie: 'Fixes: 8c5ad0dae93c ("igc: Add ethtool support")'

Quoted 10 lines
---
  drivers/net/ethernet/intel/igc/igc_ethtool.c | 2 ++
  1 file changed, 2 insertions(+)
drivers/net/ethernet/intel/igc/igc_ethtool.c +0 -0
index 8cc077b712ad..511fc3f41208 100644

drivers/net/ethernet/intel/igc/igc_ethtool.c static int igc_ethtool_get_link_ksettings(struct net_device *netdev, · line 1714

Quoted 8 lines
drivers/net/ethernet/intel/igc/igc_ethtool.c +2 -0
@@ -1707,6 +1707,8 @@ static int igc_ethtool_get_link_ksettings(struct net_device *netdev,
  	/* twisted pair */
  	cmd->base.port = PORT_TP;
  	cmd->base.phy_address = hw->phy.addr;
+	ethtool_link_ksettings_add_link_mode(cmd, supported, TP);
+	ethtool_link_ksettings_add_link_mode(cmd, advertising, TP);
 
  	/* advertising link modes */
  	if (hw->phy.autoneg_advertised & ADVERTISE_10_HALF)

Kind regards,

Paul
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

#3 lore raw

Thanks for pointing out checkpatch.pl. Ran checkpatch.pl on the patch. Script said patch is ready to submit.

I also fixed the " i225/226 parts" and added "Acked-by:" line.

Thanks guys.

Quoted 34 lines · Paul Menzel

Dear Prasad,

Am 05.06.23 um 05:15 schrieb Prasad Koya:

Quoted 1 line

set TP bit in the 'supported' and 'advertising' fields. I226 only

supports twisted pair copper.

Please wrap lines after 75 characters in commit messages.

Quoted 1 line
Fixes 8c5ad0dae93c9 ("igc: Add ethtool support")

scripts/checkpatch.pl says:

WARNING: Please use correct Fixes: style 'Fixes: <12 chars of sha1>
("<title line>")' - ie: 'Fixes: 8c5ad0dae93c ("igc: Add ethtool support")'

Review

Quoted 6 lines
---
  drivers/net/ethernet/intel/igc/igc_ethtool.c | 2 ++
  1 file changed, 2 insertions(+)
(quoted diff) +0 -0

b/drivers/net/ethernet/intel/igc/igc_ethtool.c

drivers/net/ethernet/intel/igc/igc_ethtool.c static int igc_ethtool_get_link_ksettings(struct

Quoted 4 lines

index 8cc077b712ad..511fc3f41208 100644

drivers/net/ethernet/intel/igc/igc_ethtool.c +0 -0
@@ -1707,6 +1707,8 @@ static int igc_ethtool_get_link_ksettings(struct

net_device *netdev,

Quoted 6 lines
drivers/net/ethernet/intel/igc/igc_ethtool.c +2 -0
      /* twisted pair */
      cmd->base.port = PORT_TP;
      cmd->base.phy_address = hw->phy.addr;
+     ethtool_link_ksettings_add_link_mode(cmd, supported, TP);
+     ethtool_link_ksettings_add_link_mode(cmd, advertising, TP);
 
Quoted 8 lines

drivers/net/ethernet/intel/igc/igc_ethtool.c static int igc_ethtool_get_link_ksettings(struct net_device *netdev, · line 1714

Quoted 2 lines
drivers/net/ethernet/intel/igc/igc_ethtool.c +0 -0
      /* advertising link modes */
      if (hw->phy.autoneg_advertised & ADVERTISE_10_HALF)

Kind regards,

Paul

_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

Tested-by on v2 1/1
#4 lore raw
In reply to Prasad Koya
Quoted 7 lines · Prasad Koya

set TP bit in the 'supported' and 'advertising' fields. I226 only supports twisted pair copper.

Fixes 8c5ad0dae93c9 ("igc: Add ethtool support")
---
  drivers/net/ethernet/intel/igc/igc_ethtool.c | 2 ++
  1 file changed, 2 insertions(+)

_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan