All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Prashanth K <prashanth.k@oss.qualcomm.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH] usb: typec: ucsi: Get the connector fwnode based on reg value
Date: Tue, 22 Sep 2026 14:17:07 +0200	[thread overview]
Message-ID: <arJxwyOeMuSUc4HV@black.igk.intel.com> (raw)
In-Reply-To: <81666138-d6b4-460d-90fa-3b372e9da99c@oss.qualcomm.com>

On Mon, Sep 21, 2026 at 03:03:55PM +0530, Prashanth K wrote:
> 
> 
> On 9/18/2026 2:48 PM, Heikki Krogerus wrote:
> > On Wed, Sep 16, 2026 at 09:58:08AM +0530, Prashanth K wrote:
> >> ucsi_find_fwnode() currently maps UCSI connectors to Device tree
> >> connector nodes based on the order in which connector child nodes
> >> are described in DT.
> >>
> >> This can fail because the ordering of child nodes isn't guaranteed
> >> in Device-tree. For example, DTB may contain connector@1 before
> >> connector@0, causing connector numbers to be associated with the wrong
> >> fwnode. As a result, role switch and Type-C notifications can be
> >> delivered to the wrong remote endpoints.
> >>
> >> Fix this by using the "reg" property of each connector to match
> >> its corresponding fwnode. While at it, if the reg property isn't
> >> present, then fall back to the old method.
> >>
> >> Fixes: c1b0bc2dabfa ("usb: typec: Add support for UCSI interface")
> > 
> > That commit does not yet include any kind of support for DT.
> > 
> 
> I understand DT wasn't added at the point where this commit was
> authored. But this is the base commit where the bug was introduced,
> that's why I added it in fixes tag. Do you have any other suggestion ?
> 
> The patch simply distinguishes connectors with and without <reg>
> property and uses different logics, hence it should work for all targets.

Fair enough.

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>

-- 
heikki

      reply	other threads:[~2026-09-22 12:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-16  4:28 [PATCH] usb: typec: ucsi: Get the connector fwnode based on reg value Prashanth K
2026-09-18  9:18 ` Heikki Krogerus
2026-09-21  9:33   ` Prashanth K
2026-09-22 12:17     ` Heikki Krogerus [this message]

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=arJxwyOeMuSUc4HV@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=prashanth.k@oss.qualcomm.com \
    --cc=stable@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.