mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Kory Maincent <kory.maincent@bootlin.com>
Cc: Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Kyle Swenson <kyle.swenson@est.tech>,
	thomas.petazzoni@bootlin.com,
	Oleksij Rempel <o.rempel@pengutronix.de>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH net] net: pse-pd: Fix enabled status mismatch
Date: Wed, 2 Oct 2024 14:38:19 +0200	[thread overview]
Message-ID: <965905ef-cc00-49fa-bee9-2b45d6155108@lunn.ch> (raw)
In-Reply-To: <20241002121706.246143-1-kory.maincent@bootlin.com>

On Wed, Oct 02, 2024 at 02:17:05PM +0200, Kory Maincent wrote:
> PSE controllers like the TPS23881 can forcefully turn off their
> configuration state. In such cases, the is_enabled() and get_status()
> callbacks will report the PSE as disabled, while admin_state_enabled
> will show it as enabled. This mismatch can lead the user to attempt
> to enable it, but no action is taken as admin_state_enabled remains set.
> 
> The solution is to disable the PSE before enabling it, ensuring the
> actual status matches admin_state_enabled.
> 
> Fixes: d83e13761d5b ("net: pse-pd: Use regulator framework within PSE framework")
> Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
> ---
> 
> FYI: Saving the enabled state in the driver is not a viable solution, as a
> reboot may cause a mismatch between the real and software-saved states.

This seems O.K. to me.

I'm assuming the controller has turned the configuration state to off
to stop the magic smoke escaping? Is there any sort of notification of
this?  Does it raise an interrupt? Sometime in the future we might
want to add a netlink notification about this?

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

  reply	other threads:[~2024-10-02 12:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-02 12:17 Kory Maincent
2024-10-02 12:38 ` Andrew Lunn [this message]
2024-10-02 12:46   ` Kory Maincent
2024-10-04 22: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=965905ef-cc00-49fa-bee9-2b45d6155108@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kory.maincent@bootlin.com \
    --cc=kuba@kernel.org \
    --cc=kyle.swenson@est.tech \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    --cc=pabeni@redhat.com \
    --cc=thomas.petazzoni@bootlin.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

all inboxes | Powered by JetHome®