From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C6081348452 for ; Thu, 7 May 2026 10:40:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778150449; cv=none; b=h5UGyPfUkySgHe4pF2O4m2LL/elw6HeEDwYL7M6rMn6aLjWG0/9zJKeZFSBEqIt5leKOmWT6NV/ltBdv+brNeNPMOECUIjZnJP7Fo3F0WE2ufdgRnO5UbI48RrSzy3bx6KP7cnG60f7gAdDHhw9Y5FDZKR1g+ZH4nYN6klUdcJs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778150449; c=relaxed/simple; bh=3TLtPSGtHME2zaQgYjH2+H7h/lbZgh1MNcLB/MSHzog=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=NLKJJKtFMqQgaZvhkVuah76Ls2Q50hikKh8EyXwd9BZ1Aq71QKwaKltW4BhHtbgjav14x7evTINLzXJdjgPqFaHJUAkkQQRdFEHndRz7Ec8viiDkXhrLaljB+elnwSQhIqYOm1EMqu9RKAyLdyw39nhqdq8i8nZcgoIHr+MBpAg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=aeIiTD85; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=MYXMc1DU; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="aeIiTD85"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="MYXMc1DU" Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6478q7Mr259326 for ; Thu, 7 May 2026 10:40:47 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= PGTevllouHgU5n6pKJsSjzVnRCs5BCktvfEWEgejUNk=; b=aeIiTD85f5iJxByw +O2uXgOSnro7fWdCvtI/TALlGm9sMlZQgOSH1w0arpUJVXJbfVkGyeQQvcLVWLH1 NhROP2TR9v8yhVrykYn+qmyZVGoO3Ba0gkn6WE1aId1ab45O4hw3M21+4mWyek9k m2R9oeNPGECqYSszZdm8OxBEKi+F+YerQfWB335phbY/BuESKhFaBLIq1cHvxz2v 1kIFeVR4wpX+0CmSH3l9g516+07NHZ+YJmQuX9EVTiTIDYthfRQRJ3CsT4hV9Oud LlY+96mYcnt5c5w2dUJPGKkoGqsCtSz8katN9KNBiNabPzTgGRHl9RCM5ir5m/4F oSuymw== Received: from mail-ua1-f71.google.com (mail-ua1-f71.google.com [209.85.222.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e0hr8srq5-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 07 May 2026 10:40:47 +0000 (GMT) Received: by mail-ua1-f71.google.com with SMTP id a1e0cc1a2514c-9569deb349aso19223241.3 for ; Thu, 07 May 2026 03:40:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1778150446; x=1778755246; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=PGTevllouHgU5n6pKJsSjzVnRCs5BCktvfEWEgejUNk=; b=MYXMc1DUPTUhWqHNUTcbGji5epuKCF9NVn0lBX8dPnOp0O6TdYByrWC970PXEEyC4O ZbRO0aprFiDic4sKPuknLp9weLlJaIKJwSJfBFLqFBbNajHNc65PyuxvgX5bslPHp6aM CPqHKWQyGxxokZ9OGoNH7XFazvrMKc9qRLsTmpztHQMShHa8FLSwaC1jzypSSJ2/0eTV YKnHFuxbqAWaIHkbu+3fNNi2wUe40sWmRg9YKGQmSCCVyCVuHOLkl65L2e/012rkBE3q Q9B9/klgR5POOzgdPQI8B10K6FyYo3UMaRepAw4O3ZIqAwJj/1dH5GVyE4O9ZiHBEbIj uVQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778150446; x=1778755246; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=PGTevllouHgU5n6pKJsSjzVnRCs5BCktvfEWEgejUNk=; b=pC1GVxYgRtp1ldyCALakaDHSr7uTPJASwnpmJyVnNJWPxSxelSs9OPlexYWa1uspHm /SJKvVfda/akXTtBDjoQEx2wdaCQXHZ9XekxTclHdQU7SM5gVMTqR6FCik5BpgXXA2lH Fc97vCLY7kuQRcv0aeolePR+GseW2c26jFZqFOPK/wyfKfmIeS3ea3j1dyPFOtaxNq0m +aZFRQ2tSr9ljaNFZ6MvhrzPPofMVVWWac/pmomq9BOZNF/5WBHXPrjr3EQPoO7O1ne8 59VWCp5X96RAbSHrHwgFZwL4Q4RofE0H0N/mPouX5yabFp65sFinDM4gg3AxaNN2m0Hx zGnw== X-Forwarded-Encrypted: i=1; AFNElJ9rio5ihtjttWxjtvAoIzRhw6GoIeKJnS2bdvOP5dRanDFWfANETM4WJJCye9bcCGGo9dlwpyFUrk60Wkc=@vger.kernel.org X-Gm-Message-State: AOJu0Yyn9zhhShoHcisF/cPoQCkvrf02CrMKwekvIOF34AOxI1svnU47 RYD5GOQmdmsjxjUlmVhPwa05ujFs+SYcOSpWUyTOKhlp2+LSub0m8rg6H5YtJD6HlskGC1Yrpg1 Fo3YbharCqVbdGAoYNwGypADDpQ2Kqeqfkh4PQJXTqkD+qHVy2U6IHglR1ByJmjNBvDI= X-Gm-Gg: AeBDiev6ylVAgl+3tAVQkx5othrb2vdAtAM5FpsZtGCWCbfetICfB8Q0dSFE5n8UEbg C27pUOVy99PZmR+NIZNtKKq3wYBo2S+rPjyUt+6LUXDSRJX+u0dX9E21xZbk/yXf7l625sN91ZH Fz0QnobUbmqT9iB+uxzebr0JhowDMR8izF4o7YBH0iOcMXx2vR+GTTvG/nc5jnXqPLWV7i4luSR AznvmS05QyDfcCjYLCwD8cAPRzTnjRGf1x8xfAI0z65V4lALm9p/Rpwaw1G6kOmb7i6baPdiRTT re4JROsi9WgAq00Wi32XATTWAdr71XiJej9c70H7CLl0K+lXbjjZZsi/jtR5v2AMt9LbQuOdc8q dPTzQLLo2FaI2qd9G72BEZbvrF5VmGbi6ksb0kFo2dlUlBjrPPwsRCeSfHNe3RWJLJVOP+NpJFN bANchFBwtI0baFfA== X-Received: by 2002:a05:6122:6214:b0:56d:baee:40 with SMTP id 71dfb90a1353d-5755cc74085mr1250382e0c.1.1778150446035; Thu, 07 May 2026 03:40:46 -0700 (PDT) X-Received: by 2002:a05:6122:6214:b0:56d:baee:40 with SMTP id 71dfb90a1353d-5755cc74085mr1250375e0c.1.1778150445607; Thu, 07 May 2026 03:40:45 -0700 (PDT) Received: from [192.168.119.254] (078088045245.garwolin.vectranet.pl. [78.88.45.245]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-bc833742a54sm65220366b.32.2026.05.07.03.40.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 07 May 2026 03:40:44 -0700 (PDT) Message-ID: <02b4a4ca-c091-47b0-bae7-e38d9fa77850@oss.qualcomm.com> Date: Thu, 7 May 2026 12:40:42 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/2] usb: host: xhci: Allow non-Intel usb_link_tunnel_mode reporting To: Mika Westerberg , Konrad Dybcio Cc: Thinh Nguyen , Greg Kroah-Hartman , Mathias Nyman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, usb4-upstream@oss.qualcomm.com, Raghavendra Thoorpu References: <20260505-topic-dwc3_tunneling_state-v1-0-4aaa6c3c14cb@oss.qualcomm.com> <20260505-topic-dwc3_tunneling_state-v1-1-4aaa6c3c14cb@oss.qualcomm.com> <20260505121404.GG6785@black.igk.intel.com> Content-Language: en-US From: Konrad Dybcio In-Reply-To: <20260505121404.GG6785@black.igk.intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-ORIG-GUID: RqGD0uVxS6nxiKg3uWUlLl0y68e9ynbU X-Authority-Analysis: v=2.4 cv=caHiaHDM c=1 sm=1 tr=0 ts=69fc6c2f cx=c_pps a=KB4UBwrhAZV1kjiGHFQexw==:117 a=FpWmc02/iXfjRdCD7H54yg==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yOCtJkima9RkubShWh1s:22 a=EUspDBNiAAAA:8 a=FtxRuB4QD5ijYHSLzlgA:9 a=QEXdDO2ut3YA:10 a=o1xkdb1NAhiiM49bd1HK:22 X-Proofpoint-GUID: RqGD0uVxS6nxiKg3uWUlLl0y68e9ynbU X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTA3MDEwNiBTYWx0ZWRfX3uzFI8MM5G3h VzWA/K4LGvI8fNnB2SWjcvxqrEwH9suThuWaH1ryXUtStTMd/H8JwrATDPm1Pch9C4rWk4uUjkv R4prCJ2+61BucC59CyGIq9jl74hmm4HsOkEIEd5uGxQNHB8uKujZ9QDGObzFaQGiVpPwhJYbuuD u7T3VwN1vdp3Hd1fnGw3NZrXMStyagP3/qVFD+9uWGo6rSsFt1Zy++otKoV1YJFwDAqYYD2QwHc ymXkVOIMXS9/PFcx766GQ8Q7Jc2gq5EO2L7qHbqZxbx2MM4KA60dsTQERrzn1yxak6P+vmwY/um tOuQTI3EXXRnl4PNzjG05H/wZjTfcqCAvJi6nPrpaHgK40up3JQIOb8Z7oIYcfDPql9miUc+9NS YDEbhN+uz6t6XidWFhQZVb65cKftgb4iMFC6EV7pKtHeZoCCXRD7tTq28h8WFS+jwrIog5K0q9Y hQVWs7CqDb4T6bgTeYg== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-05-06_02,2026-05-06_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 clxscore=1015 suspectscore=0 bulkscore=0 priorityscore=1501 adultscore=0 lowpriorityscore=0 impostorscore=0 spamscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2605070106 On 5/5/26 2:14 PM, Mika Westerberg wrote: > Hi, > > On Tue, May 05, 2026 at 10:55:04AM +0200, Konrad Dybcio wrote: >> From: Konrad Dybcio >> >> The Thunderbolt framework relies on the USB core to create device links >> for tunneled ports, so that the USB3 controller is only kept >> runtime-resumed for the duration of the tunneling. >> >> Currently, retrieving that information is only possibe on Intel XHCI >> hosts, through a vendor-specific capability. Extend xhci-plat to allow >> plumbing a custom one. >> >> Signed-off-by: Konrad Dybcio >> --- >> drivers/usb/host/xhci-hub.c | 4 ++-- >> drivers/usb/host/xhci-plat.c | 2 ++ >> drivers/usb/host/xhci-plat.h | 1 + >> drivers/usb/host/xhci.c | 6 +++++- >> drivers/usb/host/xhci.h | 5 ++++- >> 5 files changed, 14 insertions(+), 4 deletions(-) >> >> diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c >> index bacd0ddd0d09..09e5da912066 100644 >> --- a/drivers/usb/host/xhci-hub.c >> +++ b/drivers/usb/host/xhci-hub.c >> @@ -750,7 +750,7 @@ static int xhci_exit_test_mode(struct xhci_hcd *xhci) >> } >> >> /** >> - * xhci_port_is_tunneled() - Check if USB3 connection is tunneled over USB4 >> + * xhci_port_tunnel_mode() - Check if USB3 connection is tunneled over USB4 >> * @xhci: xhci host controller >> * @port: USB3 port to be checked. >> * >> @@ -764,7 +764,7 @@ static int xhci_exit_test_mode(struct xhci_hcd *xhci) >> * detecting USB3 over USB4 tunnels. USB_LINK_NATIVE or USB_LINK_TUNNELED >> * otherwise. >> */ >> -enum usb_link_tunnel_mode xhci_port_is_tunneled(struct xhci_hcd *xhci, >> +enum usb_link_tunnel_mode xhci_port_tunnel_mode(struct xhci_hcd *xhci, >> struct xhci_port *port) > > I'm wondering if this could be: > > bool xhci_port_is_tunneled() > > becase if I understand correctly that's the only information we need e.g is > it going over tunnel or not. It was originally introduced as a tristate enum in: f46a6e165197 ("usb: Add tunnel_mode parameter to usb device structure") but the usefulness of USB_LINK_UNKNOWN is limited to a dev_dbg() print.. I don't really have strong opinions either way Konrad