From: Andrew Lunn <andrew@lunn.ch>
To: "Marek Behún" <marek.behun@nic.cz>
Cc: netdev@vger.kernel.org, Heiner Kallweit <hkallweit1@gmail.com>,
Sebastian Reichel <sebastian.reichel@collabora.co.uk>,
Vivien Didelot <vivien.didelot@gmail.com>,
Florian Fainelli <f.fainelli@gmail.com>,
"David S . Miller" <davem@davemloft.net>
Subject: Re: [PATCH net-next 1/2] net: dsa: mv88e6xxx: fix RGMII-ID port setup
Date: Sun, 11 Aug 2019 17:31:53 +0200 [thread overview]
Message-ID: <20190811153153.GB14290@lunn.ch> (raw)
In-Reply-To: <20190811150812.6780-1-marek.behun@nic.cz>
On Sun, Aug 11, 2019 at 05:08:11PM +0200, Marek Behún wrote:
> The mv88e6xxx_port_setup_mac looks if one of the {link, speed, duplex}
> parameters is being changed from the current setting, and if not, does
> not do anything. This test is wrong in some situations: this method also
> has the mode argument, which can also be changed.
>
> For example on Turris Omnia, the mode is PHY_INTERFACE_MODE_RGMII_ID,
> which has to be set byt the ->port_set_rgmii_delay method. The test does
> not look if mode is being changed (in fact there is currently no method
> to determine port mode as phy_interface_t type).
>
> The simplest solution seems to be to drop this test altogether and
> simply do the setup when requested.
Hi Marek
Unfortunately, that code is there for a reason. phylink can call the
->mac_config() method once per second. It is documented that
mac_config() should only reconfigure what, if anything, has changed.
And mv88e6xxx_port_setup_mac() needs to disable the port in order to
change anything. So the change you propose here, under some
conditions, will cause the port to be disabled/enables once per
second.
We need to fix this by expanding the test, not removing it. My
current _guess_ would be, we need to add a ops->port_get_rgmii_delay()
so we can see if that is what needs configuring.
Andrew
next prev parent reply other threads:[~2019-08-11 15:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-11 15:08 [PATCH net-next 1/2] net: dsa: mv88e6xxx: fix RGMII-ID port setup Marek Behún
2019-08-11 15:08 ` [PATCH net-next 2/2] net: fixed_phy: set is_gigabit_capable member when needed Marek Behún
2019-08-11 15:40 ` Andrew Lunn
2019-08-11 16:08 ` Marek Behun
2019-08-11 16:59 ` Heiner Kallweit
2019-08-11 15:31 ` Andrew Lunn [this message]
2019-08-11 16:14 ` [PATCH net-next 1/2] net: dsa: mv88e6xxx: fix RGMII-ID port setup Marek Behun
2019-08-11 16:51 ` Andrew Lunn
2019-08-13 15:44 ` Marek Behún
2019-08-13 15:51 ` Marek Behún
2019-08-13 15:52 ` Andrew Lunn
2019-08-12 9:23 ` Sergei Shtylyov
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=20190811153153.GB14290@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=marek.behun@nic.cz \
--cc=netdev@vger.kernel.org \
--cc=sebastian.reichel@collabora.co.uk \
--cc=vivien.didelot@gmail.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).