diff mbox series

[iwl-net,v2] igc: set TP bit in 'supported' and 'advertising' fields of ethtool_link_ksettings

Message ID 20230605031534.9846-1-prasad@arista.com
State Superseded
Headers show
Series [iwl-net,v2] igc: set TP bit in 'supported' and 'advertising' fields of ethtool_link_ksettings | expand

Commit Message

Prasad Koya June 5, 2023, 3:15 a.m. UTC
set TP bit in the 'supported' and 'advertising' fields. I226 only supports twisted pair copper.

Fixes: 8c5ad0dae93c9 ("igc: Add ethtool support")
Signed-off-by: Prasad Koya <prasad@arista.com>
---
 drivers/net/ethernet/intel/igc/igc_ethtool.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Paul Menzel June 5, 2023, 5:05 p.m. UTC | #1
Dear Prasad,


Am 05.06.23 um 05:15 schrieb Prasad Koya:
> set TP bit in the 'supported' and 'advertising' fields. I226 only supports twisted pair copper.

Please wrap lines after 75 characters in commit messages.

> 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")'

> Signed-off-by: Prasad Koya <prasad@arista.com>
> ---
>   drivers/net/ethernet/intel/igc/igc_ethtool.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/ethernet/intel/igc/igc_ethtool.c b/drivers/net/ethernet/intel/igc/igc_ethtool.c
> index 8cc077b712ad..511fc3f41208 100644
> --- 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(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
Prasad Koya June 5, 2023, 6:11 p.m. UTC | #2
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.

On Mon, Jun 5, 2023 at 10:05 AM Paul Menzel <pmenzel@molgen.mpg.de> wrote:

> Dear Prasad,
>
>
> Am 05.06.23 um 05:15 schrieb Prasad Koya:
> > set TP bit in the 'supported' and 'advertising' fields. I226 only
> supports twisted pair copper.
>
> Please wrap lines after 75 characters in commit messages.
>
> > 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")'
>
> > Signed-off-by: Prasad Koya <prasad@arista.com>
> > ---
> >   drivers/net/ethernet/intel/igc/igc_ethtool.c | 2 ++
> >   1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/net/ethernet/intel/igc/igc_ethtool.c
> b/drivers/net/ethernet/intel/igc/igc_ethtool.c
> > index 8cc077b712ad..511fc3f41208 100644
> > --- 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(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
>
naamax.meir June 21, 2023, 9:23 a.m. UTC | #3
On 6/5/2023 06:15, Prasad Koya wrote:
> set TP bit in the 'supported' and 'advertising' fields. I226 only supports twisted pair copper.
> 
> Fixes: 8c5ad0dae93c9 ("igc: Add ethtool support")
> Signed-off-by: Prasad Koya <prasad@arista.com>
> ---
>   drivers/net/ethernet/intel/igc/igc_ethtool.c | 2 ++
>   1 file changed, 2 insertions(+)

Tested-by: Naama Meir <naamax.meir@linux.intel.com>
diff mbox series

Patch

diff --git a/drivers/net/ethernet/intel/igc/igc_ethtool.c b/drivers/net/ethernet/intel/igc/igc_ethtool.c
index 8cc077b712ad..511fc3f41208 100644
--- 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(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)