All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Nguyen, Anthony L" <anthony.l.nguyen@intel.com>
To: "hkallweit1@gmail.com" <hkallweit1@gmail.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"kuba@kernel.org" <kuba@kernel.org>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"sassmann@redhat.com" <sassmann@redhat.com>,
	"vinschen@redhat.com" <vinschen@redhat.com>
Subject: Re: [PATCH net v2 7/7] igc: fix link speed advertising
Date: Wed, 27 Jan 2021 23:34:11 +0000	[thread overview]
Message-ID: <fe999d382f10af7dd73d0af2eb6dd60741137f95.camel@intel.com> (raw)
In-Reply-To: <988cd2d7-e9f2-3947-7fcc-3da7fef7e34b@gmail.com>

On Wed, 2021-01-27 at 08:04 +0100, Heiner Kallweit wrote:
> On 26.01.2021 23:10, Tony Nguyen wrote:
> > From: Corinna Vinschen <vinschen@redhat.com>
> > 
> > Link speed advertising in igc has two problems:
> > 
> > - When setting the advertisement via ethtool, the link speed is
> > converted
> >   to the legacy 32 bit representation for the intel PHY code.
> >   This inadvertently drops ETHTOOL_LINK_MODE_2500baseT_Full_BIT
> > (being
> >   beyond bit 31).  As a result, any call to `ethtool -s ...' drops
> > the
> >   2500Mbit/s link speed from the PHY settings.  Only reloading the
> > driver
> >   alleviates that problem.
> > 
> >   Fix this by converting the ETHTOOL_LINK_MODE_2500baseT_Full_BIT
> > to the
> >   Intel PHY ADVERTISE_2500_FULL bit explicitly.
> > 
> > - Rather than checking the actual PHY setting, the
> > .get_link_ksettings
> >   function always fills link_modes.advertising with all link speeds
> >   the device is capable of.
> > 
> >   Fix this by checking the PHY autoneg_advertised settings and
> > report
> >   only the actually advertised speeds up to ethtool.
> > 
> > Fixes: 8c5ad0dae93c ("igc: Add ethtool support")
> > Signed-off-by: Corinna Vinschen <vinschen@redhat.com>
> > Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
> > ---
> >  drivers/net/ethernet/intel/igc/igc_ethtool.c | 24 +++++++++++++++-
> > ----
> >  1 file changed, 18 insertions(+), 6 deletions(-)
> > 
> 
> Would switching to phylib be a mid-term option for you?
> This could save quite some code and you'd get things like proper
> 2.5Gbps
> handling out of the box. Or is there anything that prevents using
> phylib?

Phylib is something we can look into though we have some device
specific quirks that we would need to see how it could be handled.
Since this is fixing a current problem and any transition to phylib
would not be immediate, I think this patch should be accepted while we
investigate phylib.

Thanks,
Tony

  reply	other threads:[~2021-01-27 23:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-26 22:10 [PATCH net v2 0/7][pull request] Intel Wired LAN Driver Updates 2021-01-26 Tony Nguyen
2021-01-26 22:10 ` [PATCH net v2 1/7] ice: fix FDir IPv6 flexbyte Tony Nguyen
2021-01-26 22:10 ` [PATCH net v2 2/7] ice: Implement flow for IPv6 next header (extension header) Tony Nguyen
2021-01-26 22:10 ` [PATCH net v2 3/7] ice: update dev_addr in ice_set_mac_address even if HW filter exists Tony Nguyen
2021-01-26 22:10 ` [PATCH net v2 4/7] ice: Don't allow more channels than LAN MSI-X available Tony Nguyen
2021-01-26 22:10 ` [PATCH net v2 5/7] ice: Fix MSI-X vector fallback logic Tony Nguyen
2021-01-26 22:10 ` [PATCH net v2 6/7] i40e: acquire VSI pointer only after VF is initialized Tony Nguyen
2021-01-26 22:10 ` [PATCH net v2 7/7] igc: fix link speed advertising Tony Nguyen
2021-01-27  7:04   ` Heiner Kallweit
2021-01-27 23:34     ` Nguyen, Anthony L [this message]
2021-01-27 18:25 ` [PATCH net v2 0/7][pull request] Intel Wired LAN Driver Updates 2021-01-26 Willem de Bruijn
2021-01-28  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=fe999d382f10af7dd73d0af2eb6dd60741137f95.camel@intel.com \
    --to=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sassmann@redhat.com \
    --cc=vinschen@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.