Linux USB
 help / color / mirror / Atom feed
From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Cc: Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Mathias Nyman <mathias.nyman@intel.com>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"usb4-upstream@oss.qualcomm.com" <usb4-upstream@oss.qualcomm.com>,
	Raghavendra Thoorpu <rthoorpu@qti.qualcomm.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>
Subject: Re: [PATCH v2 2/4] usb: xhci: Honor PORTSC.TM if valid
Date: Tue, 4 Aug 2026 21:29:16 +0000	[thread overview]
Message-ID: <anJZGqGeCt_bBD25@vbox> (raw)
In-Reply-To: <2baa405c-5f9c-487a-8969-82d697e8cb1e@oss.qualcomm.com>

On Tue, Jul 28, 2026, Konrad Dybcio wrote:
> On 7/23/26 12:57 AM, Thinh Nguyen wrote:
> > On Wed, Jul 15, 2026, Konrad Dybcio wrote:
> >> From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> >>
> >> Currently, the only way for the USB core to determine whether the link
> >> is native or tunneled is via an Intel vendor-specific Extended
> >> Capability.
> 
> [...]
> 
> >> -	/* Don't try and probe this capability for non-Intel hosts */
> >> +	/* Prefer the XHCI v1.2 ext_cap if advertised */
> >> +	offset = xhci_find_next_ext_cap(base, 0, XHCI_EXT_CAPS_USB3_TUNNELING);
> >> +	if (offset) {
> >> +		if (!(readl(base + offset) & XHCI_USB3_TUNNELING_SUPPORTED))
> >> +			return USB_LINK_NATIVE;
> > 
> > Second, don't return early here. Check if XHCI_EXT_CAPS_USB3_TUNNELING
> > present and supported:
> 
> So if the extcap is supported and exposed, but it says "this port
> is not tunneling-capable", can we not trust that data?
> > 
> > 	if (offset && (readl(base + offset) & XHCI_USB3_TUNNELING_SUPPORTED)) {
> > 
> >> +
> >> +		val = xhci_portsc_readl(port);
> >> +		if (val & PORT_TM)
> >> +			return USB_LINK_TUNNELED;
> >> +
> >> +		return USB_LINK_NATIVE;
> >> +	}
> 
> Your proposed change says "if !USB3_TUNNELING_SUPPORTED, assume it may
> still be supported via the Intel ext_cap below"
> 

Ignore this suggestion. It was tied to the idea of overriding standard
checks.

Thanks,
Thinh

  parent reply	other threads:[~2026-08-04 22:27 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-15 12:29 [PATCH v2 0/4] DWC3 link tunneling state reporting Konrad Dybcio
2026-07-15 12:29 ` [PATCH v2 1/4] usb: xhci: debugfs: Expose the USB3 tunneling ext_cap register value Konrad Dybcio
2026-07-15 12:29 ` [PATCH v2 2/4] usb: xhci: Honor PORTSC.TM if valid Konrad Dybcio
2026-07-22 22:57   ` Thinh Nguyen
2026-07-28  8:44     ` Konrad Dybcio
2026-07-31 10:34       ` Mathias Nyman
2026-07-31 10:53         ` Konrad Dybcio
2026-08-04 22:37           ` Thinh Nguyen
2026-08-04 21:29       ` Thinh Nguyen [this message]
2026-07-31 10:51   ` Mathias Nyman
2026-07-31 11:01     ` Konrad Dybcio
2026-07-15 12:29 ` [PATCH v2 3/4] usb: xhci: Allow custom op for usb_link_tunnel_mode reporting Konrad Dybcio
2026-07-22 22:37   ` Thinh Nguyen
2026-07-28  8:41     ` Konrad Dybcio
2026-08-04 21:25       ` Thinh Nguyen
2026-07-15 12:29 ` [PATCH v2 4/4] usb: dwc3: Notify XHCI core of tunneled status Konrad Dybcio
2026-07-22 23:01   ` Thinh Nguyen
2026-07-28  8:48     ` Konrad Dybcio
2026-07-15 12:58 ` [PATCH v2 0/4] DWC3 link tunneling state reporting Konrad Dybcio
2026-07-22 23:07   ` Thinh Nguyen

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=anJZGqGeCt_bBD25@vbox \
    --to=thinh.nguyen@synopsys.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=konradybcio@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=mika.westerberg@linux.intel.com \
    --cc=rthoorpu@qti.qualcomm.com \
    --cc=usb4-upstream@oss.qualcomm.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