From: Timur Tabi <timur@codeaurora.org>
To: Florian Fainelli <f.fainelli@gmail.com>,
David Miller <davem@davemloft.net>,
netdev@vger.kernel.org
Subject: Re: [PATCH] [RFC] net: phy: phy drivers should not set SUPPORTED_Pause or SUPPORTED_Asym_Pause
Date: Wed, 9 Nov 2016 11:34:02 -0600 [thread overview]
Message-ID: <58235E0A.2030305@codeaurora.org> (raw)
In-Reply-To: <26a8fde2-6403-b14e-a163-c3a1b6afeb4d@gmail.com>
On 11/09/2016 11:06 AM, Florian Fainelli wrote:
>> 1) PHY drivers and/or phylib sets the SUPPORTED_Pause |
>> SUPPORTED_AsymPause bits in phydev->supported. This indicates that the
>> PHY supports pause frames.
>
> Agreed.
So I'm still not sure *where* phylib should set the bits in
phydev->supported. I previously thought that phy_sanitize_settings()
would be a candidate, but that function is called only when
autonegotiation is disabled.
So the only thing I can think of is to do this:
/* A mapping of all SUPPORTED settings to speed/duplex */
static const struct phy_setting settings[] = {
{
.speed = SPEED_10000,
.duplex = DUPLEX_FULL,
- .setting = SUPPORTED_10000baseKR_Full,
+ .setting = SUPPORTED_10000baseKR_Full |
+ SUPPORTED_Pause | SUPPORTED_Asym_Pause,
... for all of the entries in settings[]
But this seems excessive, and I don't know if all of these SPEED_xxx
standards actually support pause frames.
>> >3) When the link state changes, the MAC driver checks
>> >phydev->advertising, and if the bits are set, then it enables those
>> >features in the MAC.
> Almost, we need to see what the link partner advertised, by looking at
> phydev->pause / phydev->asym_pause and checking the local knobs whether
> flow control can be enabled, but other than that, this looks correct to me.
Yes, that's what I meant to write. Fortunately, my EMAC driver already
does this.
--
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm
Technologies, Inc. Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.
next prev parent reply other threads:[~2016-11-09 17:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-01 17:18 [PATCH] [RFC] net: phy: phy drivers should not set SUPPORTED_Pause or SUPPORTED_Asym_Pause Timur Tabi
2016-11-01 18:35 ` Florian Fainelli
2016-11-01 18:45 ` Timur Tabi
2016-11-01 19:03 ` Florian Fainelli
2016-11-01 19:19 ` Timur Tabi
2016-11-07 16:30 ` Timur Tabi
2016-11-08 20:43 ` Timur Tabi
2016-11-09 17:06 ` Florian Fainelli
2016-11-09 17:34 ` Timur Tabi [this message]
2016-11-09 17:55 ` Florian Fainelli
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=58235E0A.2030305@codeaurora.org \
--to=timur@codeaurora.org \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--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.