From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.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 8A3713D6CA0 for ; Fri, 10 Apr 2026 14:43:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775832240; cv=none; b=S7yJS/95CzwL3orYK1EqddJUzwE8wsoDX3y+5xFI7ZEKrVcmatzhtlPwLf8I2wYNgrHLEgFQjqIRHsGNF8MSQoBDQU59bC/4eeQ3vKZFl0eIzrYT8TYdMFEabXyCTrIT9ujMf/rET4R4TR1bTplPjvaz+Xg7Wsc+0TSwe4Yr3mw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775832240; c=relaxed/simple; bh=eG5iDxFe+u+MlpyM8ayMAF31SiM8AQcTGiIqUlx+tjM=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=CH6XoAIaJXYuBDEUstOPGEUfHP8QN+lJdSsIXKR8tCqUaiOmGDWgsl4fzk71ATlgNCkKxIxuj8rSdKW1cPHqhDILD71Lzt614W6jUC0SYgQKepWBKB5U2B8pyadnt/0wImHiPluiBhcupI15wFR33HhXP5+1p5HCpQXPEYtn49E= 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=Vj9FwUx+; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=QwE3pNbE; arc=none smtp.client-ip=205.220.180.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="Vj9FwUx+"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="QwE3pNbE" Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 63AAE6U22698273 for ; Fri, 10 Apr 2026 14:43:58 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= cOCg20NL0fDvxTUOy9qQ/TfIR1lIS+FZN3UtQUvBuxQ=; b=Vj9FwUx+2/K3LgoR 083MxHtjZIptY9iMx7nnJBpAwavhAXK/Le3Vq4O1RWVHJzoVUKVhq48qOwC0AXcJ NF+j79DiNjktLeInKVKILYc8BxVpFs85hSzRohVWODx71OBfkj/EBRz9bxPtPY+o 8Z1H73P1A9oHeiS3HG+/8u+qQr2IVhFafHjzsqsRqn84H+xTRrX32y15PlRCFuUP SnFrKczfh/WjZxoxLj8Ud0ggVPVOW2cZ6/Qurl6vQtwpKIon1ryxvyU3yytPBgW4 6TBuwhuFOqR/KcTbQp7so7vURtp56XjANgfB8XgVy6xQvXb4ZXIf4/27dC5KflY0 xD9KNA== Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4degt9uhhb-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 10 Apr 2026 14:43:58 +0000 (GMT) Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-50d7128e038so5273401cf.2 for ; Fri, 10 Apr 2026 07:43:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1775832238; x=1776437038; 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=cOCg20NL0fDvxTUOy9qQ/TfIR1lIS+FZN3UtQUvBuxQ=; b=QwE3pNbEAVgYEbG9aXVtAt5mlXgSsbu79mpow80c7lj1x7z6dDJlFb7WxkqnXrScd4 EVcDNd7XoByK0zDRfes2xZE5AOekE7xHfbUS9Vy2ZJ6Uy3Tb3i5YRCgvYUkgGkQPAUx+ H1EO2SKhywsSzE8ghBfs/FCSRr73opC43H24u4SR3GgVxv3FlOaoLwtWcSUM41v96qaO c/8gRQ+1ORNVppJFheczMbTrLXSEiy2DzSzaWfCHMW1VBSCfebdZeqFtsPUSU7C6XpNt tI288K7z5UXCLYC/emU20bgoonZsZ35V9fWCzB5H4XowyvR8M4LNJ3ozPELivi5yHSBG e6jA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775832238; x=1776437038; 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=cOCg20NL0fDvxTUOy9qQ/TfIR1lIS+FZN3UtQUvBuxQ=; b=Pq+TX7apXro3XXRVLYDbL4a6UMqCPwP9w9jIhgdicRtcDUymQeSzkMKzjOGDRnSmOw xi8XL+C925T0WYTOFbu1TlGVnGjfmdpTZ6cquQ2WaiE3udyphjtJ+fcIEs+cW6Vyh6tb nxbgVtQk5EwU4S2lfFRVszR0odJiOCZyY3qIR8uCT7eGwEDNVC7E8EnVLjCJiaKpRqeh Udg0xU01d3KDm9bUCWAVhP/rcqWE8Z3GgV9bqhKtTg4Z32cIP4sHVHsIe/ttuauNYNt8 Uh29jE6Y8qaYEl93tiEGJ3knQZVK3BYHTu8vsbUgQqjFR2zKfRQNgkFPEyirB8EXALKV 3L3A== X-Forwarded-Encrypted: i=1; AJvYcCWWhAmj0IFZaZ44IfzxEOX9/8taW6ovlV8y3mpHqF+LNK5py5ueVAmYf+wX3DkA/uk11Giy+bt8hv8dLM0=@vger.kernel.org X-Gm-Message-State: AOJu0YyU4Q0GIEY8z9CdTuUelJnOTG1xtnAFBtpj8iZey0LbRaqEZDYX kbwIBYTcW4JHIp0qPgMn0UDsqTnW3lt6bGNpVAtXVPYJORgWBGnLC8Dv8/UI6acLW6lH445vEfO VyneAu1bRArHckX/Dg5PMpDP2Mn9Dz+1BeLWeRuXUze3bk4GH32t8hSCAGp5WqOBb4js= X-Gm-Gg: AeBDiesHkKiE/X/cdzNFrKdLpkWZDPA6AC6zL50pe4nQxLJQP3xJ1x1MF7sJ5DU7DJ+ yZqCkq/NLXZNdPqiHVdK7onUzLiRS+VIhhdnEnFz1fK8C2GUmgkbMlGP0GoJ2PKrEdT/a4fXJy7 oycGVujMIg2vsegUYnNwdrWXhqU+5AIahruUZC623htmzqWhM099hgBjEwyV/aGQRnlUJ0j1/mY /SRMB4sjAP+JI1oB26M3tKsODpP5oYVqIo8HjScQ3P48ZdKZEP3vfmmUhoX1AnHLaMCgAMzypeQ R8HLMiUI24bj+2CY07Qs125tSi8nD8r0qdp2So+GtGsHBSUP9uIgvLYXVsbP+zIdAKdJ6d3t8s7 +EXhL5GdDcfgBNbCFF8ToI7k0XOusMB8FLui5fBUIIs5J5z7H6vCmP2mch32hkXNHxpV2k2nO02 iA3Dc= X-Received: by 2002:a05:622a:5595:b0:509:1b76:e9ba with SMTP id d75a77b69052e-50dd5c8b23amr38355911cf.8.1775832237719; Fri, 10 Apr 2026 07:43:57 -0700 (PDT) X-Received: by 2002:a05:622a:5595:b0:509:1b76:e9ba with SMTP id d75a77b69052e-50dd5c8b23amr38355561cf.8.1775832237158; Fri, 10 Apr 2026 07:43:57 -0700 (PDT) Received: from [192.168.119.254] (078088045245.garwolin.vectranet.pl. [78.88.45.245]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5a3eee8cf46sm790568e87.23.2026.04.10.07.43.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 10 Apr 2026 07:43:56 -0700 (PDT) Message-ID: Date: Fri, 10 Apr 2026 16:43:54 +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] thunderbolt: debugfs: Don't stop reading SB registers if just one fails To: Mika Westerberg Cc: Konrad Dybcio , Andreas Noever , Mika Westerberg , Yehezkel Bernat , usb4-upstream@oss.qualcomm.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org References: <20260409-topic-tbt_sb_debugfs-v1-1-131540e0cc2b@oss.qualcomm.com> <20260409120457.GH3552@black.igk.intel.com> <75c962d1-7ade-483b-bbc9-a6c6140fc0e9@oss.qualcomm.com> <20260409143203.GI3552@black.igk.intel.com> <7d65539f-ece6-4e7c-a13e-6b12920346fa@oss.qualcomm.com> Content-Language: en-US From: Konrad Dybcio In-Reply-To: <7d65539f-ece6-4e7c-a13e-6b12920346fa@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDEwMDEzOCBTYWx0ZWRfX8bv3ENj2K+kn YPPAEtmDDrpAiJUUHyvPglQUqHM3vRtcXeJLzeOo0zgrBxFGYUMTpNCMEwUKoejmqZ6WLWrJt14 y8p1FJkxXt6rorB3mrWcXIsiaLS5iwbqev4OTvazwyuKfYvcW2+96Smfl+tsIFsPqAcpRS8GkU9 elbFicW4k2/oh7sH1EDbdUbFovi3nSd8Py8hQxWNU0ukKoivJ0cZKntYH3WKlhGLvbHxoaRnUSQ zu3lci7QmFxChBVRp6lDHNn1XmcgNr4MeEunx8HNisOBe54lCiFoA1RXzCXSeqjbsTVWgyObN9f R7bqQmes9SWlDV7dTGIueRL9uamXvgazrxPVr9chwOugQYp/29IsXytD04FhFym2nh7l26/49Ya QblC0M1S4LmpqxffueyqHe2KJ05xR7o47vSu3ZOvjzSj5Oj92aW+WSryAMhd5D3P1xoRTDi5Gvt qZ4lYRrjWeAHv/gfhVw== X-Proofpoint-ORIG-GUID: Fna6M-U8ppL06msrX9U-nwf6tFs-ZkvO X-Proofpoint-GUID: Fna6M-U8ppL06msrX9U-nwf6tFs-ZkvO X-Authority-Analysis: v=2.4 cv=BJyDalQG c=1 sm=1 tr=0 ts=69d90cae cx=c_pps a=EVbN6Ke/fEF3bsl7X48z0g==:117 a=FpWmc02/iXfjRdCD7H54yg==:17 a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=_aRDFbF4L5SVI7mo-8QA:9 a=QEXdDO2ut3YA:10 a=a_PwQJl-kcHnX1M80qC6:22 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-04-10_04,2026-04-09_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 suspectscore=0 malwarescore=0 bulkscore=0 adultscore=0 priorityscore=1501 impostorscore=0 clxscore=1015 phishscore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604010000 definitions=main-2604100138 On 4/10/26 4:29 PM, Konrad Dybcio wrote: > On 4/9/26 4:32 PM, Mika Westerberg wrote: >> On Thu, Apr 09, 2026 at 02:59:22PM +0200, Konrad Dybcio wrote: >>> On 4/9/26 2:04 PM, Mika Westerberg wrote: > > [...] > >>>> I assume you have tested this on a hardware that supports this too, right? >>> >>> Hardware that exposes that register this does not exercise the altered >>> code path. >> >> Well it may happen now that previously we got -EIO from some other register >> and we stopped there, now this changes and we actually continue reading so >> this definitely should be tested. > > The only register before USB4_SB_GEN4_TXFFE that isn't in-spec for > both retimers in v1.0 and v2.0 is USB4_SB_LRD_TUNING (0x07). The PS8830 > interestingly reports all zeroes (not a bounce). > > The registers following USB4_SB_GEN4_TXFFE in the array are > USB4_SB_VERSION and USB4_SB_DATA. The former is not accessed anywhere > else in the code, at first glance. The latter is, during NVM r/w and > in margining ops, which have definitely been in use for a long time. > > Plus both of them are the v1.0 spec. The USB4_SB_GEN4_TXFFE specifically > isn't (the retimer supplement pdf lists it as Rsvd, the main spec pdf > omits it in the SB register table), as it wasn't previously useful (since > Gen4 came about in v2.0). > > > I don't think there's an easy way to limit the reading of this register > since the bit indicating Gen4 capability is in USB4_SB_LINK_CONF (0x0c), > which is Rsvd on retimers regardless of the spec revision. A connected > port could easily have higher/lower capabilities, too. Checked again, the USB4_SB_FW_VERSION (0x02) register's lowest 8 bytes are 0/1 for retimers implementing USB4v1 and 2 for v2, so we may go this path too Konrad