[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2ce3b809-28c4-487a-85d2-c62bce7260b0@linux.dev>
Date: Thu, 10 Jul 2025 19:58:52 -0400
From: Sean Anderson <sean.anderson@...ux.dev>
To: Simon Horman <horms@...nel.org>
Cc: Daniel Golle <daniel@...rotopia.org>, netdev@...r.kernel.org,
Andrew Lunn <andrew+netdev@...n.ch>, "David S . Miller"
<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Maxime Chevallier <maxime.chevallier@...tlin.com>,
Russell King <linux@...linux.org.uk>,
Vineeth Karumanchi <vineeth.karumanchi@....com>,
Heiner Kallweit <hkallweit1@...il.com>, linux-kernel@...r.kernel.org,
Kory Maincent <kory.maincent@...tlin.com>,
Christian Marangi <ansuelsmth@...il.com>, Lei Wei <quic_leiwei@...cinc.com>,
Michal Simek <michal.simek@....com>,
Radhey Shyam Pandey <radhey.shyam.pandey@....com>,
Robert Hancock <robert.hancock@...ian.com>, John Crispin <john@...ozen.org>,
Felix Fietkau <nbd@....name>, Robert Marko <robimarko@...il.com>
Subject: Re: [RFC] comparing the propesed implementation for standalone PCS
drivers
On 7/10/25 18:50, Sean Anderson wrote:
> /* In mac_probe() or whatever */
> scoped_guard(mutex)(&pcs_remove_lock) {
> /* Just imagine some terrible contortions for compatibility here */
> struct phylink_pcs *pcs = pcs_get(dev, "my_pcs");
> if (IS_ERR(pcs))
> return PTR_ERR(pcs);
>
> list_add(pcs->list, &config.pcs_list);
One thing we could do would be to add a mac_priv field to the PCS that the
MAC could stick some kind of identifier in. I could live with that.
But I still don't like how you'd need to hold a lock across pcs_get/
phylink_create. It feels like an unwieldy API.
> ret = phylink_create(config, dev->fwnode, interface,
> &mac_phylink_ops);
> if (ret)
> return ret;
> }
> /* At this point the PCS could have already been removed */
--Sean
Powered by blists - more mailing lists