From: Andrew Lunn <andrew@lunn.ch>
To: Dimitris Michailidis <d.michailidis@fungible.com>
Cc: davem@davemloft.net, Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org
Subject: Re: [PATCH net-next 4/8] net/funeth: ethtool operations
Date: Fri, 31 Dec 2021 03:24:38 +0100 [thread overview]
Message-ID: <Yc5p5iAELXFCuY9t@lunn.ch> (raw)
In-Reply-To: <CAOkoqZk3tgLi-iY0gju8KAwWvcyHXJUQ61MxAij9BwfMrakniA@mail.gmail.com>
On Thu, Dec 30, 2021 at 05:23:56PM -0800, Dimitris Michailidis wrote:
> On Thu, Dec 30, 2021 at 2:26 PM Andrew Lunn <andrew@lunn.ch> wrote:
> >
> > > > I _think_ this is wrong. pause->autoneg means we are autoneg'ing
> > > > pause, not that we are using auto-neg in general. The user can have
> > > > autoneg turned on, but force pause by setting pause->autoneg to False.
> > > > In that case, the pause->rx_pause and pause->tx_pause are given direct
> > > > to the MAC, not auto negotiated.
> > >
> > > Having this mixed mode needs device FW support, which isn't there today.
> >
> > So if you are asked to set pause with pause->autoneg False, return
> > -EOPNOTSUPP. And pause get should always return True. It is O.K, to
> > support a subset of a feature, and say you don't support the
> > rest. That is much better than wrongly implementing it until your
> > firmware gets the needed support.
>
> include/uapi/linux/ethtool.h has this comment
>
> * If the link is autonegotiated, drivers should use
> * mii_advertise_flowctrl() or similar code to set the advertised
> * pause frame capabilities based on the @rx_pause and @tx_pause flags,
> * even if @autoneg is zero. ...
>
> I read this as saying that pause->autoneg is ignored if AN is on and the
> requested pause settings are fed to AN. I believe this is what the code
> here implements.
>
> Whereas you are saying that pause->autoneg == 0 should force
> despite AN. Right?
Take a look at phylink_ethtool_set_pauseparam() and accompanying
functions. This is a newish central implementation for any MAC/PHY
with Linux controlling the hardware. There are ambiguities in the API
description, so it would be better if your driver/firmware combo does
the same a the core Linux code. When Russell wrote that code, there
was quite a bit of discussion what the documentation actually means.
Andrew
next prev parent reply other threads:[~2021-12-31 2:24 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-30 16:39 [PATCH net-next 0/8] new Fungible Ethernet driver Dimitris Michailidis
2021-12-30 16:39 ` [PATCH net-next 1/8] PCI: add Fungible vendor ID to pci_ids.h Dimitris Michailidis
2021-12-30 16:39 ` [PATCH net-next 2/8] net/fungible: Add service module for Fungible drivers Dimitris Michailidis
2021-12-30 17:28 ` Andrew Lunn
2021-12-30 18:24 ` Dimitris Michailidis
2021-12-30 19:00 ` Andrew Lunn
2021-12-30 20:13 ` Dimitris Michailidis
2021-12-30 16:39 ` [PATCH net-next 3/8] net/funeth: probing and netdev ops Dimitris Michailidis
2021-12-30 17:40 ` Andrew Lunn
2021-12-30 18:33 ` Dimitris Michailidis
2021-12-30 19:02 ` Andrew Lunn
2021-12-30 20:05 ` Dimitris Michailidis
2021-12-31 11:14 ` Heiner Kallweit
2022-01-03 22:11 ` Dimitris Michailidis
2021-12-30 16:39 ` [PATCH net-next 4/8] net/funeth: ethtool operations Dimitris Michailidis
2021-12-30 18:04 ` Andrew Lunn
2021-12-30 20:22 ` Jakub Kicinski
2021-12-30 20:30 ` Dimitris Michailidis
2021-12-30 20:43 ` Jakub Kicinski
2021-12-30 20:56 ` Dimitris Michailidis
2021-12-30 20:27 ` Dimitris Michailidis
2021-12-30 22:25 ` Andrew Lunn
2021-12-31 1:23 ` Dimitris Michailidis
2021-12-31 2:24 ` Andrew Lunn [this message]
2021-12-31 3:23 ` Dimitris Michailidis
2021-12-30 20:28 ` Jakub Kicinski
2021-12-30 20:31 ` Dimitris Michailidis
2021-12-30 16:39 ` [PATCH net-next 5/8] net/funeth: devlink support Dimitris Michailidis
2021-12-30 17:41 ` Jakub Kicinski
2021-12-30 16:39 ` [PATCH net-next 6/8] net/funeth: add the data path Dimitris Michailidis
2021-12-30 16:39 ` [PATCH net-next 7/8] net/funeth: add kTLS TX control part Dimitris Michailidis
2021-12-30 16:39 ` [PATCH net-next 8/8] net/fungible: Kconfig, Makefiles, and MAINTAINERS Dimitris Michailidis
2021-12-30 17:43 ` Jakub Kicinski
2021-12-30 20:54 ` Dimitris Michailidis
2021-12-30 21:16 ` Dimitris Michailidis
2021-12-30 22:17 ` Jakub Kicinski
2021-12-30 22:27 ` Andrew Lunn
2021-12-30 22:59 ` Dimitris Michailidis
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=Yc5p5iAELXFCuY9t@lunn.ch \
--to=andrew@lunn.ch \
--cc=d.michailidis@fungible.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
/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.