From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Marco Felsch <m.felsch@pengutronix.de>
Cc: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Fabio Estevam <festevam@gmail.com>,
Matthias Kaehlcke <mka@chromium.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, kernel@pengutronix.de
Subject: Re: [PATCH v5 1/4] usb: port: track the disabled state
Date: Mon, 30 Mar 2026 15:15:18 +0200 [thread overview]
Message-ID: <2026033002-cyclist-onslaught-30ee@gregkh> (raw)
In-Reply-To: <mavc4ului42mdozzfwxd6zfa5b664umlqe5dal2r6knnilbi5a@ubnxauwhnoue>
On Fri, Mar 20, 2026 at 11:16:43PM +0100, Marco Felsch wrote:
> On 26-03-11, Greg Kroah-Hartman wrote:
> > On Mon, Feb 23, 2026 at 12:27:34PM +0100, Marco Felsch wrote:
> > > The disable state isn't tracked at the moment, instead the state is
> > > directly passed to the hub driver. Change this behavior to only trigger
> > > the hub if a state change happened. Exit early in case of no state
> > > changes but don't return an error.
> > >
> > > Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
>
> ...
>
> > > #define to_usb_port(_dev) \
> > > diff --git a/drivers/usb/core/port.c b/drivers/usb/core/port.c
> > > index 44e38f922bc553adee64b35c536dfd4154a42d8a..86e9d6d0c0f505782569565fde8e4a46b06b8b4d 100644
> > > --- a/drivers/usb/core/port.c
> > > +++ b/drivers/usb/core/port.c
> > > @@ -117,6 +117,10 @@ static ssize_t disable_store(struct device *dev, struct device_attribute *attr,
> > > if (rc)
> > > return rc;
> > >
> > > + /* Early quit if no change was detected */
> > > + if (port_dev->disabled == disabled)
> > > + return count;
> > > +
> >
> > This will change behavior where someone tells the port to be enabled
> > again, when it already is. Is that ok?
>
> That's the whole purpose of this patch. Can you please elaborate why
> someone wants to enable or disbale a port more than once in a row?
I have given up trying to understand why users do what users do :)
next prev parent reply other threads:[~2026-03-30 13:15 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-23 11:27 [PATCH v5 0/4] Add onboard-dev USB hub host managed vbus handling support Marco Felsch
2026-02-23 11:27 ` [PATCH v5 1/4] usb: port: track the disabled state Marco Felsch
2026-03-11 14:43 ` Greg Kroah-Hartman
2026-03-20 22:16 ` Marco Felsch
2026-03-30 13:15 ` Greg Kroah-Hartman [this message]
2026-02-23 11:27 ` [PATCH v5 2/4] usb: hub: add infrastructure to pass onboard_dev port features Marco Felsch
2026-03-11 14:44 ` Greg Kroah-Hartman
2026-03-20 22:26 ` Marco Felsch
2026-02-23 11:27 ` [PATCH v5 3/4] dt-bindings: usb: usb-device: add usb hub port vbus-supply suppport Marco Felsch
2026-02-23 11:28 ` Marco Felsch
2026-03-06 0:01 ` Rob Herring (Arm)
2026-02-23 11:27 ` [PATCH v5 4/4] usb: misc: onboard_dev: add hub downstream port host vbus-supply handling Marco Felsch
2026-03-05 11:29 ` [PATCH v5 0/4] Add onboard-dev USB hub host managed vbus handling support Marco Felsch
2026-03-17 3:44 ` Ze Huang
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=2026033002-cyclist-onslaught-30ee@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=kernel@pengutronix.de \
--cc=krzk+dt@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=m.felsch@pengutronix.de \
--cc=mka@chromium.org \
--cc=robh@kernel.org \
/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