From: Jamie Gloudon <jamie.gloudon@gmx•fr>
To: Andrew Lunn <andrew@lunn•ch>
Cc: Tony Nguyen <anthony.l.nguyen@intel•com>,
davem@davemloft•net, kuba@kernel•org, pabeni@redhat•com,
edumazet@google•com, netdev@vger•kernel.org,
sasha.neftin@intel•com, Naama Meir <naamax.meir@linux•intel.com>
Subject: Re: [PATCH net-next 1/1] e1000e: Enable Link Partner Advertised Support
Date: Wed, 4 Jan 2023 04:59:13 -0400 [thread overview]
Message-ID: <Y7U/4Q0QKtkuexLu@gmx.fr> (raw)
In-Reply-To: <Y7TMhVy5CdqqysRb@lunn.ch>
On Wed, Jan 04, 2023 at 01:47:01AM +0100, Andrew Lunn wrote:
> > --- a/drivers/net/ethernet/intel/e1000e/phy.c
> > +++ b/drivers/net/ethernet/intel/e1000e/phy.c
> > @@ -2,6 +2,7 @@
> > /* Copyright(c) 1999 - 2018 Intel Corporation. */
> >
> > #include "e1000.h"
> > +#include <linux/ethtool.h>
> >
> > static s32 e1000_wait_autoneg(struct e1000_hw *hw);
> > static s32 e1000_access_phy_wakeup_reg_bm(struct e1000_hw *hw, u32 offset,
> > @@ -1011,6 +1012,8 @@ static s32 e1000_phy_setup_autoneg(struct e1000_hw *hw)
> > */
> > mii_autoneg_adv_reg &=
> > ~(ADVERTISE_PAUSE_ASYM | ADVERTISE_PAUSE_CAP);
> > + phy->autoneg_advertised &=
> > + ~(ADVERTISED_Pause | ADVERTISED_Asym_Pause);
> > break;
> > case e1000_fc_rx_pause:
> > /* Rx Flow control is enabled, and Tx Flow control is
> > @@ -1024,6 +1027,8 @@ static s32 e1000_phy_setup_autoneg(struct e1000_hw *hw)
> > */
> > mii_autoneg_adv_reg |=
> > (ADVERTISE_PAUSE_ASYM | ADVERTISE_PAUSE_CAP);
> > + phy->autoneg_advertised |=
> > + (ADVERTISED_Pause | ADVERTISED_Asym_Pause);
> > break;
> > case e1000_fc_tx_pause:
> > /* Tx Flow control is enabled, and Rx Flow control is
> > @@ -1031,6 +1036,8 @@ static s32 e1000_phy_setup_autoneg(struct e1000_hw *hw)
> > */
> > mii_autoneg_adv_reg |= ADVERTISE_PAUSE_ASYM;
> > mii_autoneg_adv_reg &= ~ADVERTISE_PAUSE_CAP;
> > + phy->autoneg_advertised |= ADVERTISED_Asym_Pause;
> > + phy->autoneg_advertised &= ~ADVERTISED_Pause;
> > break;
> > case e1000_fc_full:
> > /* Flow control (both Rx and Tx) is enabled by a software
> > @@ -1038,6 +1045,8 @@ static s32 e1000_phy_setup_autoneg(struct e1000_hw *hw)
> > */
> > mii_autoneg_adv_reg |=
> > (ADVERTISE_PAUSE_ASYM | ADVERTISE_PAUSE_CAP);
> > + phy->autoneg_advertised |=
> > + (ADVERTISED_Pause | ADVERTISED_Asym_Pause);
> > break;
> > default:
> > e_dbg("Flow control param set incorrectly\n");
> > --
>
> I don't know this driver at all. What i don't see anywhere here is
> using the results of the pause auto-neg. Is there some code somewhere
> that looks at the local and link peer advertising values and runs a
> resolve algorithm to determine what pause should be used, and program
> it into the MAC?
>
> Andrew
This is a old patch i had laying around, If i remember correctly, phy->autoneg_advertised plugs in "Link partner
advertised pause frame use link" line in ethtool everytime the nic renegotiate.
next prev parent reply other threads:[~2023-01-04 9:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-03 23:06 [PATCH net-next 1/1] e1000e: Enable Link Partner Advertised Support Tony Nguyen
2023-01-04 0:34 ` Andrew Lunn
2023-01-04 0:47 ` Andrew Lunn
2023-01-04 8:59 ` Jamie Gloudon [this message]
2023-01-04 17:44 ` Andrew Lunn
2023-01-04 18:52 ` Jamie Gloudon
2023-01-09 8:40 ` Neftin, Sasha
2023-01-09 13:02 ` Andrew Lunn
2023-01-10 1:50 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y7U/4Q0QKtkuexLu@gmx.fr \
--to=jamie.gloudon@gmx$(echo .)fr \
--cc=andrew@lunn$(echo .)ch \
--cc=anthony.l.nguyen@intel$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=edumazet@google$(echo .)com \
--cc=kuba@kernel$(echo .)org \
--cc=naamax.meir@linux$(echo .)intel.com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
--cc=sasha.neftin@intel$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox