Thread (21 messages) 21 messages, 3 authors, 2024-01-10

Re: [PATCH net-next 08/30] net: dsa: mt7530: change p{5,6}_interface to p{5,6}_configured

From: Vladimir Oltean <olteanv@gmail.com>
Date: 2023-06-04 13:26:01
Also in: linux-arm-kernel, linux-mediatek, lkml

Possibly related (same subject, not in this thread)

On Sun, Jun 04, 2023 at 04:14:31PM +0300, Arınç ÜNAL wrote:
On 4.06.2023 16:07, Russell King (Oracle) wrote:
quoted
On Sun, Jun 04, 2023 at 03:55:17PM +0300, Vladimir Oltean wrote:
quoted
On Sun, Jun 04, 2023 at 01:18:04PM +0100, Russell King (Oracle) wrote:
quoted
I don't remember whether Vladimir's firmware validator will fail for
mt753x if CPU ports are not fully described, but that would be well
worth checking. If it does, then we can be confident that phylink
will always be used, and those bypassing calls should not be necessary.
It does, I've just retested this:

[    8.469152] mscc_felix 0000:00:00.5: OF node /soc/pcie@1f0000000/ethernet-switch@0,5/ports/port@4 of CPU port 4 lacks the required "phy-handle", "fixed-link" or "managed" properties
[    8.494571] mscc_felix 0000:00:00.5: error -EINVAL: Failed to register DSA switch
[    8.502151] mscc_felix: probe of 0000:00:00.5 failed with error -22
... which isn't listed in dsa_switches_apply_workarounds[], and
neither is mt753x. Thanks.

So, that should be sufficient to know that the CPU port will always
properly described, and thus bypassing phylink in mt753x for the CPU
port should not be necessary.
Perfect! If I understand correctly, there's this code - specific to MT7531
and MT7988 ports being used as CPU ports - which runs in addition to what's
in mt753x_phylink_mac_config():

	mt7530_write(priv, MT7530_PMCR_P(port),
		     PMCR_CPU_PORT_SETTING(priv->id));

This should be put on mt753x_phylink_mac_config(), under priv->id ==
ID_MT7531, priv->id == ID_MT7988, and dsa_is_cpu_port(ds, port) checks?

Arınç
Given that mt753x_phylink_mac_config() and mt753x_phylink_mac_link_up() also
both modifies MT7530_PMCR_P(port), have you studied the code to see what
really is changed compared to what's in the PMCR_CPU_PORT_SETTING() macro,
after both phylink methods have run?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help