From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Marco Tormento <mtormento80@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Alan Stern <stern@rowland.harvard.edu>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: core: deattach child device from typec connector on port unbind
Date: Mon, 27 Jul 2026 13:13:11 +0200 [thread overview]
Message-ID: <amc9R83pQ8-XyYYm@black.igk.intel.com> (raw)
In-Reply-To: <CACF_UwoqtaGMB=O2em92JcTnW1RP_ozD415ieAbMBgmmq+gG6w@mail.gmail.com>
Hi Marco,
On Wed, Jul 22, 2026 at 06:25:30PM +0200, Marco Tormento wrote:
> On Wed, 22 Jul 2026 at 18:02, Heikki Krogerus
> <heikki.krogerus@linux.intel.com> wrote:
> > There is already a fix for this:
> > https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/commit/?h=usb-linus&id=e0b291fe117964037e0ba382eff4bb365d531c3a
>
> Sorry, I did not notice it.
> Shouldn't the typec deattach come before the sysfs removals though,
> reversing what happens in connector_bind?
We should not need to reverse anything. We can't avoid calling
typec_attach() separately from connector_bind() because we can't
prevent USB devices from being enumerated before the typec drivers are
loaded for example during bootup. But that does not mean we need to
call typec_deattach() in connector_unbind().
After the USB device is "attached" to the typec connector, the
connector device should be pinned down for as long as the USB device
exists, but that is not happening. So what both you guys are doing, is
working around a problem with the reference count.
I can see that most of your commit message is written by some LLM, and
the parts that you've added don't usually belong to the commit
message. That makes me a bit concerned about how much you actually
understand what the code that you are modifying does.
Use of LLMs is fine, but you still have understand the code that you
modify.
Br,
--
heikki
next prev parent reply other threads:[~2026-07-27 11:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-21 20:22 [PATCH] usb: core: deattach child device from typec connector on port unbind Marco Tormento
2026-07-22 16:02 ` Heikki Krogerus
2026-07-22 16:25 ` Marco Tormento
2026-07-27 11:13 ` Heikki Krogerus [this message]
2026-07-27 16:51 ` Marco Tormento
2026-08-05 11:49 ` Heikki Krogerus
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=amc9R83pQ8-XyYYm@black.igk.intel.com \
--to=heikki.krogerus@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mtormento80@gmail.com \
--cc=stern@rowland.harvard.edu \
/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