From: Vladimir Oltean <olteanv@gmail.com>
To: Sergei Antonov <saproj@gmail.com>
Cc: netdev@vger.kernel.org, rmk+kernel@armlinux.org.uk
Subject: Re: Regression: supported_interfaces filling enforcement
Date: Mon, 10 Jul 2023 15:35:56 +0300 [thread overview]
Message-ID: <20230710123556.gufuowtkre652fdp@skbuf> (raw)
In-Reply-To: <CABikg9wM0f5cjYY0EV_i3cMT2JcUT1bSe_kkiYk0wFwMrTo8=w@mail.gmail.com>
On Tue, Jul 04, 2023 at 05:28:47PM +0300, Sergei Antonov wrote:
> Hello!
> This commit seems to break the mv88e6060 dsa driver:
> de5c9bf40c4582729f64f66d9cf4920d50beb897 "net: phylink: require
> supported_interfaces to be filled"
>
> The driver does not fill 'supported_interfaces'. What is the proper
> way to fix it? I managed to fix it by the following quick code.
> Comments? Recommendations?
Ok, it seems that commit de5c9bf40c45 ("net: phylink: require
supported_interfaces to be filled") was based on a miscalculation.
>
> +static void mv88e6060_get_caps(struct dsa_switch *ds, int port,
> + struct phylink_config *config)
> +{
> + __set_bit(PHY_INTERFACE_MODE_INTERNAL, config->supported_interfaces);
> + __set_bit(PHY_INTERFACE_MODE_GMII, config->supported_interfaces);
This is enough to fix phylink generic validation on the front-facing
ports with internal PHYs. But it is possible (and encouraged) to use
phylink on the CPU port too (rev-mii, rev-rmii); currently that's not
enforced for mv88e6060 because it's in the dsa_switches_apply_workarounds[]
array.
Could you please modify your device tree to add a fixed-link and
phy-mode property on your CPU port so that phylink does get used, and
populate supported_interfaces and mac_capabilities properly on the MII
ports (4 and 5) as well (so that it doesn't fail validation)?
> +}
> +
> static const struct dsa_switch_ops mv88e6060_switch_ops = {
> .get_tag_protocol = mv88e6060_get_tag_protocol,
> .setup = mv88e6060_setup,
> .phy_read = mv88e6060_phy_read,
> .phy_write = mv88e6060_phy_write,
> + .phylink_get_caps = mv88e6060_get_caps
Comma at the end, please.
> };
next prev parent reply other threads:[~2023-07-10 12:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-04 14:28 Regression: supported_interfaces filling enforcement Sergei Antonov
2023-07-08 14:01 ` Linux regression tracking (Thorsten Leemhuis)
2023-07-30 16:16 ` Linux regression tracking #update (Thorsten Leemhuis)
2023-07-10 12:35 ` Vladimir Oltean [this message]
2023-07-10 14:35 ` Sergei Antonov
2023-07-10 15:38 ` Vladimir Oltean
2023-07-10 18:09 ` Sergei Antonov
2023-07-11 21:58 ` Vladimir Oltean
2023-07-12 0:58 ` Andrew Lunn
2023-08-09 12:11 ` Russell King (Oracle)
2023-07-13 15:08 ` Russell King (Oracle)
2023-07-25 10:58 ` Linux regression tracking (Thorsten Leemhuis)
2023-07-25 11:26 ` Russell King (Oracle)
2023-07-26 13:45 ` Vladimir Oltean
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=20230710123556.gufuowtkre652fdp@skbuf \
--to=olteanv@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=rmk+kernel@armlinux.org.uk \
--cc=saproj@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