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 v2] net: dsa: remove obsolete phylink dsa_switch operations
Date: Fri, 4 Oct 2024 01:28:21 +0300 [thread overview]
Message-ID: <20241003222821.2jngvjyaqbp4ibub@skbuf> (raw)
In-Reply-To: <Zv64OWFyXY5B0B-l@shell.armlinux.org.uk>
On Thu, Oct 03, 2024 at 04:28:57PM +0100, Russell King (Oracle) wrote:
> Yes, that's correct, but let's keep it to this for the moment.
>
> There's more to do with mac_select_pcs(). When it was introdued, we
> needed a way to distinguish whether the method was actually implemented
> or whether the old phylink_set_pcs() function was being used. Those days
> are long gone, so returning ERR_PTR(-EOPNOTSUPP) no longer makes much
> sense.
>
> DSA's core code returns this, as does mv88e6xxx when the chip doesn't
> have any pcs_ops (I'm not sure now why I did the latter now.)
>
> So, I'd like to (a) make mv88e6xxx_mac_select_pcs() return NULL, then
> kill dsa_port_phylink_mac_select_pcs() and then eliminate:
>
> if (mac_ops->mac_select_pcs &&
> mac_ops->mac_select_pcs(config, PHY_INTERFACE_MODE_NA) !=
> ERR_PTR(-EOPNOTSUPP))
> using_mac_select_pcs = true;
>
> replacing all other cases of pl->using_mac_select_pcs with a test
> for pl->mac_ops->mac_select_pcs being non-NULL.
>
> However, that's for later - I think for this patch, it makes sense
> to keep returning the ERR_PTR() value because that's what it was
> doing prior to this patch - we're then only removing the members
> on the dsa_switch_ops and their callsite in this patch.
I was about to write the same thing earlier, except I stopped when I realized
I also had no idea why mv88e6xxx_mac_select_pcs() returns ERR_PTR(-EOPNOTSUPP).
The removal of using_mac_select_pcs is "further work", and deleting
dsa_port_phylink_mac_select_pcs() altogether, although it can also be
done now, can be grouped with that.
next prev parent reply other threads:[~2024-10-03 22:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-03 11:52 [PATCH net-next v2] net: dsa: remove obsolete phylink dsa_switch operations Russell King (Oracle)
2024-10-03 14:51 ` Vladimir Oltean
2024-10-03 15:28 ` Russell King (Oracle)
2024-10-03 22:28 ` Vladimir Oltean [this message]
2024-10-07 23:40 ` 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=20241003222821.2jngvjyaqbp4ibub@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