From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.forwardemail.net (smtp.forwardemail.net [149.28.215.223]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A68F84AD4AB for ; Mon, 7 Sep 2026 13:38:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=149.28.215.223 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788788320; cv=none; b=WZ1x3fxrHzKz7tGa6wKKgFU3Flf/xm5IALtg9P6+Ng60BvfG8O+hcIW75BNkRmlXODvlzL4tlERAkK7NxnI+eRIlscyre5s+fIbRoDG1sGU0tHgT/nTSjvglMil+mhU2vuzJ1MlHs+1nQ9RrsL5Oeej2nw32VQ+VQrhmccka+ww= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788788320; c=relaxed/simple; bh=iaMpImiqRfMHj6DqEGiyzWM4yVp5IzapU9WS4TDmgCI=; h=Mime-Version:Content-Type:Date:Message-Id:Subject:From:To:Cc: References:In-Reply-To; b=l2N5r5+rnpNrksVjecnFFlGj4pUirbN5uGW74WcA9x3jMzYw8qApcY6Idzpk3bOPSyeyOX/OE2rk7eoV0+PPSopFfH5S3YCw0gzkJNhtRX/ixJA9Fn2k7V3a9u0sFu4PuT9tM1xn7Wua39QtKZsuTtvOV16nbx1sedBgjyUYKVo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ubuntu.com; spf=pass smtp.mailfrom=fe-bounces.ubuntu.com; dkim=pass (2048-bit key) header.d=ubuntu.com header.i=@ubuntu.com header.b=gvzxkkAk; arc=none smtp.client-ip=149.28.215.223 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ubuntu.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fe-bounces.ubuntu.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ubuntu.com header.i=@ubuntu.com header.b="gvzxkkAk" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ubuntu.com; h=In-Reply-To: References: Cc: To: From: Subject: Message-Id: Date: Content-Type: Content-Transfer-Encoding: Mime-Version; q=dns/txt; s=fe-953a8a3ca9; t=1788788317; bh=slBfEXfmlFqojlsYQ0rgM6V/6N10xUVb/4TTHC5BcLU=; b=gvzxkkAkCYy5RSQHKZhe60v7Vofdsw8LSs5InZKz+Xs49LGSrmI8hEH2i8YqNErp9436tJNTQ q5OJkjEMIwN3YfaN5ETkRXd2gTBkbjg1KgORRnGoiI8NTaaBa1RhqNNxo4hjNue07OBLstuO3ZN QYubBetRYUrbLb3RfkH0AiuerN03WDTCePUOery65FZCjATEB9sy2CAiiGomO37fTprHIY58kao Oz3KaqBh/5sVbAggRG2HWBEY4M45Y4XjL2hmBw67912+sHdSV0Hkw4cSh8nF+bPzsfRNml+Rp7A 7AV1/5y6f2lRguvldhNgBwiEPvlSbLjh3TaD6jAiwpew== X-Forward-Email-ID: 6a9ebe5670f4b45aa0d06668 X-Forward-Email-Sender: rfc822; jpeisach@ubuntu.com, smtp.forwardemail.net, 149.28.215.223 X-Forward-Email-Version: 2.14.2 X-Forward-Email-Website: https://forwardemail.net X-Complaints-To: abuse@forwardemail.net X-Report-Abuse: abuse@forwardemail.net X-Report-Abuse-To: abuse@forwardemail.net Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8; format=Flowed Date: Mon, 07 Sep 2026 09:38:28 -0400 Message-Id: Subject: Re: [PATCH v2 11/22] thunderbolt: Find Apple VSE capability during startup From: "Joshua Peisach" To: "Sven Peter" , "Heikki Krogerus" , "Greg Kroah-Hartman" , "Rob Herring" , "Krzysztof Kozlowski" , "Conor Dooley" , "Janne Grunau" , "Neal Gompa" , "Andreas Noever" , "Mika Westerberg" , "Yehezkel Bernat" , "Philipp Zabel" Cc: "Konrad Dybcio" , , , , , X-Mailer: aerc 0.21.0 References: <20260906-b4-apple-soc-tbt-v2-0-1f80085f93fb@kernel.org> <20260906-b4-apple-soc-tbt-v2-11-1f80085f93fb@kernel.org> In-Reply-To: <20260906-b4-apple-soc-tbt-v2-11-1f80085f93fb@kernel.org> On Sun Sep 6, 2026 at 2:36 PM EDT, Sven Peter wrote: > Only Apple Silicon host routers have the Apple vendor-specific extended > capability. Look it up when the software connection manager starts and > store its offset in the root switch. > > The Apple NHI driver can then use the stored offset when programming > cable information without searching the router capabilities itself. > > Signed-off-by: Sven Peter > --- > drivers/thunderbolt/tb.c | 4 ++++ > drivers/thunderbolt/tb.h | 2 ++ > drivers/thunderbolt/tb_regs.h | 1 + > 3 files changed, 7 insertions(+) > > diff --git a/drivers/thunderbolt/tb.c b/drivers/thunderbolt/tb.c > index bf1c192ec10a..d2832323cc36 100644 > --- a/drivers/thunderbolt/tb.c > +++ b/drivers/thunderbolt/tb.c > @@ -3025,6 +3025,10 @@ static int tb_start(struct tb *tb, bool reset) > return dev_err_probe(tb->nhi->dev, PTR_ERR(tb->root_switch), > "failed to allocate host router\n"); > =20 > + ret =3D tb_switch_find_vse_cap(tb->root_switch, TB_VSE_CAP_APPLE); > + if (ret > 0) > + tb->root_switch->cap_vsec_apple =3D ret; > + Nitpick: I *think* based on the surrounding code that this can be simplified to "if (ret)" -Josh