All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Timur Tabi <timur@codeaurora.org>
Cc: "David S. Miller" <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: [PATCH 1/2] [for 4.13] net: qcom/emac: disable flow control autonegotiation by default
Date: Wed, 2 Aug 2017 04:58:47 +0200	[thread overview]
Message-ID: <20170802025847.GB8415@lunn.ch> (raw)
In-Reply-To: <6a6ac2c1-eb78-d7fd-5721-49dd6a550913@codeaurora.org>

On Tue, Aug 01, 2017 at 07:56:31PM -0500, Timur Tabi wrote:
> On 8/1/17 6:15 PM, Andrew Lunn wrote:
> >Pause frames are something you can auto-negotiate at the PHY
> >level. Should you also be clearing some bits in the phydev, so the
> >peer knows pause frames are not supported?
> 
> When pause frame autonegotiation is enabled in the driver, that only means
> that the driver looks at what the PHY has autonegotiated, and then
> configures the MAC to match that.
> 
> The driver doesn't touch the PHY at all.  It leaves all that to phylib.
> 
> Now if autonegotiation is disabled in the driver, then it just hard-codes
> those TX/RX settings in the driver.  Are you saying I should program the PHY
> at the point to disable autonegotiation on the PHY level?  If so, then I
> don't know how to do that.  I just assumed that the MAC never tells the PHY
> what to do.

Documentation/networking/phy.txt says:

Pause frames / flow control

 The PHY does not participate directly in flow control/pause frames except by
 making sure that the SUPPORTED_Pause and SUPPORTED_AsymPause bits are set in
 MII_ADVERTISE to indicate towards the link partner that the Ethernet MAC
 controller supports such a thing. Since flow control/pause frames generation
 involves the Ethernet MAC driver, it is recommended that this driver takes care
 of properly indicating advertisement and support for such features by setting
 the SUPPORTED_Pause and SUPPORTED_AsymPause bits accordingly. This can be done
 either before or after phy_connect() and/or as a result of implementing the
 ethtool::set_pauseparam feature.

So just check if the MAC driver is setting SUPPORTED_Pause and
SUPPORTED_AsymPause.

	Andrew

  reply	other threads:[~2017-08-02  2:58 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-01 21:37 [PATCH 0/2] net: qcom/emac: fixes for pause frame floods Timur Tabi
2017-08-01 21:37 ` [PATCH 1/2] [for 4.13] net: qcom/emac: disable flow control autonegotiation by default Timur Tabi
2017-08-01 21:55   ` Florian Fainelli
2017-08-01 22:02     ` Timur Tabi
2017-08-01 22:08       ` Florian Fainelli
2017-08-01 23:15   ` Andrew Lunn
2017-08-02  0:56     ` Timur Tabi
2017-08-02  2:58       ` Andrew Lunn [this message]
2017-08-02  3:22         ` Timur Tabi
2017-08-02 13:48   ` David Laight
2017-08-02 14:21     ` Timur Tabi
2017-08-02 14:51       ` David Laight
2017-08-02 15:08         ` Timur Tabi
2017-08-02 15:38           ` David Laight
2017-08-02 17:54   ` David Miller
2017-08-02 18:23     ` Timur Tabi
2017-08-02 18:35       ` David Miller
2017-08-02 18:39         ` Timur Tabi
2017-08-02 23:15           ` David Miller
2017-08-03  1:00             ` Timur Tabi
2017-08-02 18:36       ` David Miller
2017-08-01 21:37 ` [PATCH 2/2] net: qcom/emac: add software control for pause frame mode Timur Tabi
2017-08-01 21:51   ` Florian Fainelli
2017-08-01 22:00     ` Timur Tabi
2017-08-01 22:06       ` Florian Fainelli
2017-09-12 22:07   ` Timur Tabi

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=20170802025847.GB8415@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=timur@codeaurora.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.