[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241125114223.7aa1a1de@kmaincent-XPS-13-7390>
Date: Mon, 25 Nov 2024 11:42:23 +0100
From: Kory Maincent <kory.maincent@...tlin.com>
To: Oleksij Rempel <o.rempel@...gutronix.de>
Cc: Andrew Lunn <andrew@...n.ch>, "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo
Abeni <pabeni@...hat.com>, Jonathan Corbet <corbet@....net>, Donald Hunter
<donald.hunter@...il.com>, Rob Herring <robh@...nel.org>, Andrew Lunn
<andrew+netdev@...n.ch>, Simon Horman <horms@...nel.org>, Heiner Kallweit
<hkallweit1@...il.com>, Russell King <linux@...linux.org.uk>, Liam Girdwood
<lgirdwood@...il.com>, Mark Brown <broonie@...nel.org>, Thomas Petazzoni
<thomas.petazzoni@...tlin.com>, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org, linux-doc@...r.kernel.org, Kyle Swenson
<kyle.swenson@....tech>, Dent Project <dentproject@...uxfoundation.org>,
kernel@...gutronix.de, Maxime Chevallier <maxime.chevallier@...tlin.com>
Subject: Re: [PATCH RFC net-next v3 12/27] net: pse-pd: Add support for
reporting events
On Sun, 24 Nov 2024 10:26:34 +0100
Oleksij Rempel <o.rempel@...gutronix.de> wrote:
> On Thu, Nov 21, 2024 at 03:42:38PM +0100, Kory Maincent wrote:
> > From: Kory Maincent (Dent Project) <kory.maincent@...tlin.com>
> >
> > Add support for devm_pse_irq_helper() to register PSE interrupts. This aims
> > to report events such as over-current or over-temperature conditions
> > similarly to how the regulator API handles them but using a specific PSE
> > ethtool netlink socket.
> >
> > Signed-off-by: Kory Maincent <kory.maincent@...tlin.com>
>
> ....
>
> > @@ -634,6 +752,7 @@ pse_control_get_internal(struct pse_controller_dev
> > *pcdev, unsigned int index) psec->pcdev = pcdev;
> > list_add(&psec->list, &pcdev->pse_control_head);
> > psec->id = index;
> > + psec->attached_phydev = phydev;
>
> Hm, i guess, here is missing some sort of phy_attach_pse.
> Otherwise the phydev may be removed.
I don't think so as a phy_device remove call will also free the pse control
pointer through the pse_control_put() function.
https://elixir.bootlin.com/linux/v6.11.7/source/drivers/net/phy/phy_device.c#L1045
Regards,
--
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
Powered by blists - more mailing lists