From: Vladimir Oltean <olteanv@gmail.com>
To: "Russell King (Oracle)" <linux@armlinux.org.uk>
Cc: Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
Florian Fainelli <f.fainelli@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org
Subject: Re: [PATCH net-next] net: dsa: mark parsed interface mode for legacy switch drivers
Date: Tue, 8 Aug 2023 16:52:15 +0300 [thread overview]
Message-ID: <20230808135215.tqhw4mmfwp2c3zy2@skbuf> (raw)
In-Reply-To: <ZNI7x9uMe6UP2Xhr@shell.armlinux.org.uk>
On Tue, Aug 08, 2023 at 01:57:43PM +0100, Russell King (Oracle) wrote:
> Thanks for the r-b.
>
> At risk of delaying this patch through further discussion... so I'll
> say now that we're going off into discussions about future changes.
>
> I believe all DSA drivers that provide .phylink_get_caps fill in the
> .mac_capabilities member, which leaves just a few drivers that do not,
> which are:
>
> $ git grep -l dsa_switch_ops.*= drivers/net/dsa/ | xargs grep -L '\.phylink_get_caps'
> drivers/net/dsa/dsa_loop.c
> drivers/net/dsa/mv88e6060.c
> drivers/net/dsa/realtek/rtl8366rb.c
> drivers/net/dsa/vitesse-vsc73xx-core.c
>
> I've floated the idea to Linus W and Arinc about setting
> .mac_capabilities in the non-phylink_get_caps path as well, suggesting:
Not sure what you mean by "in the non-phylink_get_caps path" (what is
that other path). Don't you mean that we should implement phylink_get_caps()
for these drivers, to have a unified code flow for everyone?
>
> MAC_1000 | MAC_100 | MAC_10 | MAC_SYM_PAUSE | MAC_ASYM_PAUSE
>
> support more than 1G speeds. I think the only exception to that may
> be dsa_loop, but as I think that makes use of the old fixed-link
> software emulated PHYs, I believe that would be limited to max. 1G
> as well.
I don't believe that dsa_loop makes use of fixed-link at all. Its user
ports use phy/gmii mode through the non-OF-based dsa_slave_phy_connect()
to the ds->slave_mii_bus, and the CPU port goes through the non-OF code
path ("else" block) here (because dsa_loop_bdinfo.c _is_ non-OF-based):
dsa_port_setup:
case DSA_PORT_TYPE_CPU:
if (dp->dn) {
err = dsa_shared_port_link_register_of(dp);
if (err)
break;
dsa_port_link_registered = true;
} else {
dev_warn(ds->dev,
"skipping link registration for CPU port %d\n",
dp->index);
}
> If we did set .mac_capabilities, then dsa_port_phylink_validate() would
> always call phylink_generic_validate() for all DSA drivers, and at that
> point, we don't need dsa_port_phylink_validate() anymore as it provides
> nothing that isn't already done inside phylink.
>
> Once dsa_port_phylink_validate() is gone, then I believe there are no
> drivers populating the .validate method in phylink_mac_ops, which
> then means there is the possibility to remove that method.
Assuming I understand correctly, I agree it would be beneficial for
mv88e6060, rtl8366rb and vsc73xx to populate mac_capabilities and
supported_interfaces.
next prev parent reply other threads:[~2023-08-08 15:48 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-08 11:12 [PATCH net-next] net: dsa: mark parsed interface mode for legacy switch drivers Russell King (Oracle)
2023-08-08 12:06 ` Vladimir Oltean
2023-08-08 12:30 ` Russell King (Oracle)
2023-08-08 12:39 ` Vladimir Oltean
2023-08-08 12:57 ` Russell King (Oracle)
2023-08-08 13:52 ` Vladimir Oltean [this message]
2023-08-08 14:19 ` Russell King (Oracle)
2023-08-10 15:16 ` Vladimir Oltean
2023-08-12 12:16 ` Russell King (Oracle)
2023-08-13 10:50 ` Vladimir Oltean
2023-08-13 21:56 ` Linus Walleij
2023-08-13 22:17 ` Russell King (Oracle)
2023-08-15 6:41 ` Linus Walleij
2023-08-14 14:59 ` Vladimir Oltean
2023-08-14 15:12 ` Russell King (Oracle)
2023-08-14 15:46 ` Andrew Lunn
2023-08-14 16:27 ` Russell King (Oracle)
2023-08-14 17:05 ` Andrew Lunn
2023-08-14 22:03 ` Russell King (Oracle)
2023-08-14 23:33 ` Andrew Lunn
2023-08-15 10:13 ` Russell King (Oracle)
2023-08-17 18:01 ` Vladimir Oltean
2023-08-17 18:19 ` Vladimir Oltean
2023-08-17 18:27 ` Vladimir Oltean
2023-08-17 18:52 ` Andrew Lunn
2023-08-17 19:17 ` Vladimir Oltean
2023-08-18 11:11 ` Russell King (Oracle)
2023-08-18 11:40 ` Vladimir Oltean
2023-08-18 13:08 ` Linus Walleij
2023-08-18 13:29 ` Russell King (Oracle)
2023-08-18 16:06 ` Linus Walleij
2023-08-18 13:44 ` Vladimir Oltean
2023-08-18 13:10 ` Russell King (Oracle)
2023-08-18 14:21 ` Vladimir Oltean
2023-08-18 16:49 ` Vladimir Oltean
2023-08-14 22:21 ` Linus Walleij
2023-08-14 15:47 ` Vladimir Oltean
2023-08-08 16:35 ` Andrew Lunn
2023-08-08 12:39 ` Vladimir Oltean
2023-08-09 20:20 ` patchwork-bot+netdevbpf
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=20230808135215.tqhw4mmfwp2c3zy2@skbuf \
--to=olteanv@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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