From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: "René van Dorst" <opensource@vdorst.com>
Cc: netdev@vger.kernel.org
Subject: Re: phylink: flow control on fixed-link not working.
Date: Wed, 17 Jul 2019 22:51:50 +0100 [thread overview]
Message-ID: <20190717215150.tk3gvq7lqc56scac@shell.armlinux.org.uk> (raw)
In-Reply-To: <20190717213111.Horde.nir2D5kAJww569fjh8BZgZm@www.vdorst.com>
On Wed, Jul 17, 2019 at 09:31:11PM +0000, René van Dorst wrote:
> Hi,
>
> I am trying to enable flow control/pause on PHYLINK and fixed-link.
>
> My setup SOC mac (mt7621) <-> RGMII <-> SWITCH mac (mt7530).
>
> It seems that in fixed-link mode all the flow control/pause bits are cleared
> in
> phylink_parse_fixedlink(). If I read phylink_parse_fixedlink() [0] correctly,
> I see that pl->link_config.advertising is AND with pl->supprted which has only
> the PHY_SETTING() modes bits set. pl->link_config.advertising is losing Pause
> bits. pl->link_config.advertising is used in phylink_resolve_flow() to set the
> MLO_PAUSE_RX/TX BITS.
>
> I think this is an error.
> Because in phylink_start() see this part [1].
>
> /* Apply the link configuration to the MAC when starting. This allows
> * a fixed-link to start with the correct parameters, and also
> * ensures that we set the appropriate advertisement for Serdes links.
> */
> phylink_resolve_flow(pl, &pl->link_config);
> phylink_mac_config(pl, &pl->link_config);
>
>
> If I add a this hacky patch below, flow control is enabled on the fixed-link.
> if (s) {
> __set_bit(s->bit, pl->supported);
> + if (phylink_test(pl->link_config.advertising, Pause))
> + phylink_set(pl->supported, Pause);
> } else {
>
> So is phylink_parse_fixedlink() broken or should it handled in a other way?
Quite simply, if the MAC says it doesn't support pause modes (i.o.w.
the validate callback clears them) then pause modes aren't supported.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up
next prev parent reply other threads:[~2019-07-17 21:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-17 21:31 phylink: flow control on fixed-link not working René van Dorst
2019-07-17 21:51 ` Russell King - ARM Linux admin [this message]
2019-07-17 22:58 ` René van Dorst
2019-07-19 19:52 ` René van Dorst
2019-07-26 21:28 ` Russell King - ARM Linux admin
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=20190717215150.tk3gvq7lqc56scac@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=opensource@vdorst.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).