intel-wired-lan: igc: set TP bit in ethtool_link_ksettings.supported field
Subsystems (2)
PATCH 1/1 intel-wired-lan: igc: set TP bit in ethtool_link_ksettings.supported field
From: Prasad Koya <[email protected]>
if the physical media is twisted pair copper, set the TP bit in the 'supported' field
--- drivers/net/ethernet/intel/igc/igc_ethtool.c | 2 ++ 1 file changed, 2 insertions(+)
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; +if (hw->phy.media_type == igc_media_type_copper) +ethtool_link_ksettings_add_link_mode (cmd, supported,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
Quoted 15 lines · On 6/1/2023 21:53, [email protected] wrote:
From: Prasad Koya <[email protected]>
if the physical media is twisted pair copper, set the TP bit in the 'supported' field
Signed-off-by Prasad Koya <[email protected]>--- drivers/net/ethernet/intel/igc/igc_ethtool.c | 2 ++ 1 file changed, 2 insertions(+)drivers/net/ethernet/intel/igc/igc_ethtool.c +0
-0
drivers/net/ethernet/intel/igc/igc_ethtool.c static int igc_ethtool_get_link_ksettings(struct net_device *netdev, · line 1710
Quoted 4 lines
drivers/net/ethernet/intel/igc/igc_ethtool.c +1
-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; +if (hw->phy.media_type == igc_media_type_copper)
Thank you Prasad. i225/6 parts supported only copper media type. We can drop the "if" condition.
drivers/net/ethernet/intel/igc/igc_ethtool.c static int igc_ethtool_get_link_ksettings(struct net_device *netdev, · line 1711
Quoted 1 line
drivers/net/ethernet/intel/igc/igc_ethtool.c +1
-0+ethtool_link_ksettings_add_link_mode (cmd, supported,TP );
Do you want to see: "Supported ports: [ TP ]"? That's right.
drivers/net/ethernet/intel/igc/igc_ethtool.c static int igc_ethtool_get_link_ksettings(struct net_device *netdev, · line 1714
Quoted 3 lines
drivers/net/ethernet/intel/igc/igc_ethtool.c +0
-0/* 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
Thanks for the quick review.
Yes, we use ETHTOOL_GLINKSETTINGS ioctl to retrieve interface settings and expect to see one of TP or MII set in the 'supported' bitmask.
I'll send out a new patch removing the if(). Would you accept the patch into your staging tree and later push it to the stable kernel branch? This is my first time sending to intel-wired-lan. Not sure how it works.
Thank you.
Quoted 18 lines · Sasha
Review
Quoted 11 lines · On 6/1/2023 21:53, [email protected] wrote:
From: Prasad Koya <[email protected]>
if the physical media is twisted pair copper, set the TP bit in the 'supported' field
Signed-off-by Prasad Koya <[email protected]>--- 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.cdrivers/net/ethernet/intel/igc/igc_ethtool.c static int igc_ethtool_get_link_ksettings(struct
Quoted 4 lines
index
8cc077b712ad..7d197fa80d5d100644drivers/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 13 lines
drivers/net/ethernet/intel/igc/igc_ethtool.c static int igc_ethtool_get_link_ksettings(struct net_device *netdev, · line 1710
Quoted 4 lines
drivers/net/ethernet/intel/igc/igc_ethtool.c +1
-0/* twisted pair */ cmd->base.port =PORT_TP ; cmd->base.phy_address = hw->phy.addr; +if (hw->phy.media_type == igc_media_type_copper)Thank you Prasad. i225/6 parts supported only copper media type. We can drop the "if" condition.
drivers/net/ethernet/intel/igc/igc_ethtool.c static int igc_ethtool_get_link_ksettings(struct net_device *netdev, · line 1711
Quoted 1 line
drivers/net/ethernet/intel/igc/igc_ethtool.c +1
-0+ethtool_link_ksettings_add_link_mode (cmd, supported,TP );Do you want to see: "Supported ports: [ TP ]"? That's right.
Quoted 3 lines
drivers/net/ethernet/intel/igc/igc_ethtool.c +0
-0/* 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
Hi Sasha
In our internal review, we found that igb and other vendors' drivers set the TP (or other media) bit in the 'advertising' field as well. So I made the and tested the change in 6.1.31 kernel. Will send that patch for review.
Thank you.
Quoted 5 lines · Prasad Koya
Thanks for the quick review.
Yes, we use
ETHTOOL_GLINKSETTINGSioctl to retrieve interface settings and expect to see one of TP or MII set in the 'supported' bitmask.
Quoted 40 lines
I'll send out a new patch removing the
if(). Would you accept the patch into your staging tree and later push it to the stable kernel branch? This is my first time sending to intel-wired-lan. Not sure how it works.Thank you.
Quoted 31 lines · Sasha
Review
Quoted 11 lines · On 6/1/2023 21:53, [email protected] wrote:
From: Prasad Koya <[email protected]>
if the physical media is twisted pair copper, set the TP bit in the 'supported' field
Signed-off-by Prasad Koya <[email protected]>--- 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.cdrivers/net/ethernet/intel/igc/igc_ethtool.c static int igc_ethtool_get_link_ksettings(struct
Quoted 4 lines
index
8cc077b712ad..7d197fa80d5d100644drivers/net/ethernet/intel/igc/igc_ethtool.c +0
-0@@ -1707,6 +1707,8 @@ static int igc_ethtool_get_link_ksettings(struct
net_device*netdev,drivers/net/ethernet/intel/igc/igc_ethtool.c static int igc_ethtool_get_link_ksettings(struct net_device *netdev, · line 1710
Quoted 4 lines
drivers/net/ethernet/intel/igc/igc_ethtool.c +1
-0/* twisted pair */ cmd->base.port =PORT_TP ; cmd->base.phy_address = hw->phy.addr; +if (hw->phy.media_type == igc_media_type_copper)Thank you Prasad. i225/6 parts supported only copper media type. We can drop the "if" condition.
drivers/net/ethernet/intel/igc/igc_ethtool.c static int igc_ethtool_get_link_ksettings(struct net_device *netdev, · line 1711
Quoted 1 line
drivers/net/ethernet/intel/igc/igc_ethtool.c +1
-0+ethtool_link_ksettings_add_link_mode (cmd, supported,TP );Do you want to see: "Supported ports: [ TP ]"? That's right.
Quoted 3 lines
drivers/net/ethernet/intel/igc/igc_ethtool.c +0
-0/* 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
Quoted 10 lines · Prasad Koya
Hi Sasha
In our internal review, we found that igb and other vendors' drivers set the TP (or other media) bit in the 'advertising' field as well. So I made the and tested the change in 6.1.31 kernel. Will send that patch for review.
Thank you.
On Fri, Jun 2, 2023 at 12:49 AM Prasad Koya <[email protected] <mailto:[email protected]>> wrote:
Thanks for the quick review.
Quoted 8 lines
Yes, we use
ETHTOOL_GLINKSETTINGSioctl to retrieve interface settings and expect to see one of TP or MII set in the 'supported' bitmask.I'll send out a new patch removing the
if(). Would you accept the patch into your staging tree and later push it to the stable kernel branch? This is my first time sending to intel-wired-lan. Not sure how it works.
1. yes, definitely we will accept.
2. please, use the [iwl-net] prefix, for example:
[iwl-net, v2] igc: set TP bit in ethtool_link_ksettings.supported field
3. you might add the fixes tag. Example:
Thanks,
Sasha
Quoted 32 lines
Thank you.
On Fri, Jun 2, 2023 at 12:34 AM Neftin, Sasha <[email protected] <mailto:[email protected]>> wrote:
On 6/1/2023 21:53, [email protected] <mailto:[email protected]> wrote:
> From: Prasad Koya <[email protected] <mailto:[email protected]>> >
> if the physical media is twisted pair copper, set the TP bit
in the
> 'supported' field
>
> Signed-off-by: Prasad Koya <[email protected]
<mailto:[email protected]>>
> ---
> drivers/net/ethernet/intel/igc/igc_ethtool.c | 2 ++ > 1 file changed, 2 insertions(+)
>
> diff --gita/drivers/net/ethernet/intel/igc/igc_ethtool.c
b/drivers/net/ethernet/intel/igc/igc_ethtool.c
> index8cc077b712ad..7d197fa80d5d100644
> ---a/drivers/net/ethernet/intel/igc/igc_ethtool.c
> +++b/drivers/net/ethernet/intel/igc/igc_ethtool.c
> @@ -1707,6 +1707,8 @@ static int
igc_ethtool_get_link_ksettings(structnet_device*netdev,
> /* twisted pair */
> cmd->base.port =PORT_TP;
> cmd->base.phy_address =hw->phy.addr;
> + if (hw->phy.media_type==igc_media_type_copper)
Thank you Prasad. i225/6 parts supported only copper media type.
Quoted 9 lines
We can
drop the "if" condition.
> + ethtool_link_ksettings_add_link_mode(cmd,
supported, TP);
Do you want to see: "Supported ports: [ TP ]"? That's right.
>
> /* 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
Quoted 1 line
Quoted 1 line
Quoted 1 line
2. please, use the [iwl-net] prefix, for example:
[iwl-net, v2] igc: set TP bit in ethtool_link_ksettings.supported field
3. you might add the fixes tag. Example:
<<<
Sent the current version after adding (2) and (3)
Thank you.
Quoted 35 lines · Sasha
Quoted 14 lines · Prasad Koya
Hi Sasha
In our internal review, we found that igb and other vendors' drivers set the TP (or other media) bit in the 'advertising' field as well. So I made the and tested the change in 6.1.31 kernel. Will send that patch for review.
Thank you.
On Fri, Jun 2, 2023 at 12:49 AM Prasad Koya <[email protected] <mailto:[email protected]>> wrote:
Thanks for the quick review.
Quoted 8 lines
Yes, we use
ETHTOOL_GLINKSETTINGSioctl to retrieve interface settings and expect to see one of TP or MII set in the 'supported' bitmask.I'll send out a new patch removing the
if(). Would you accept the patch into your staging tree and later push it to the stable kernel branch? This is my first time sending to intel-wired-lan. Not sure how it works.1. yes, definitely we will accept.
2. please, use the [iwl-net] prefix, for example:
[iwl-net, v2] igc: set TP bit in ethtool_link_ksettings.supported field
3. you might add the fixes tag. Example:Fixes 8c5ad0dae93c9 ("igc: Add ethtool support")Thanks,
SashaQuoted 3 lines
Thank you.
Quoted 41 lines
Quoted 6 lines
On Fri, Jun 2, 2023 at 12:34 AM Neftin, Sasha <[email protected] <mailto:[email protected]>> wrote:
On 6/1/2023 21:53, [email protected] <mailto:[email protected]> wrote:
> From: Prasad Koya <[email protected] <mailto:Quoted 32 lines
>
> if the physical media is twisted pair copper, set the TP bit
in the
> 'supported' field
>
> Signed-off-by: Prasad Koya <[email protected]
<mailto:[email protected]>>
> ---
>drivers/net/ethernet/intel/igc/igc_ethtool.c| 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --gita/drivers/net/ethernet/intel/igc/igc_ethtool.c
b/drivers/net/ethernet/intel/igc/igc_ethtool.c
> index8cc077b712ad..7d197fa80d5d100644
> ---a/drivers/net/ethernet/intel/igc/igc_ethtool.c> +++b/drivers/net/ethernet/intel/igc/igc_ethtool.c> @@ -1707,6 +1707,8 @@ static int
igc_ethtool_get_link_ksettings(structnet_device*netdev,
> /* twisted pair */
>cmd->base.port=PORT_TP;
>cmd->base.phy_address=hw->phy.addr;
> + if (hw->phy.media_type==igc_media_type_copper)
Thank you Prasad. i225/6 parts supported only copper media type. We can
drop the "if" condition.
> + ethtool_link_ksettings_add_link_mode(cmd,
supported, TP);
Do you want to see: "Supported ports: [ TP ]"? That's right.
>
> /* 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