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 9B1953C1987 for ; Mon, 13 Apr 2026 11:43:54 +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=1776080636; cv=none; b=ecxLM5Lyzdcr1PCebVk+mKlZb/NYy3+3AZcBseeI3a8k1/tTyYLbCfziLvylXnyDoDTwTUSbZRIydpyD0ofyzyn6eFoUlp02+liH/QXK9jR3vTzJhKdJ/nAm/Fk8IjhRL7fbqe/5U6DW2lf/ZdGCwqNCBA5/jUfIpXZbtz+kU1w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776080636; c=relaxed/simple; bh=i9efmPG4SlS24+mgUeX5DlBrdGjbZNhJM+Hmz6fjy2I=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=mfmupD+B4cLcIp03GIiq5wP/1zgPQZ2741A/DB+cNb1MAtc23rJusJJtHGoWytDT1FMiiGHxuAYHbnebo8hMeii6RfDTjv5rCiHfSfJ00nDmu8ZlBR5GPN+nyRGwo94R4XNNetNzwS1e+f1GhrhM6eUav28R7LczVccvvmy8MRI= 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=Xvlo/hKv; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=ZwwXgWNm; 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="Xvlo/hKv"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="ZwwXgWNm" Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 63D5ZVaS439830 for ; Mon, 13 Apr 2026 11:43:53 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= Vyq8cBSbpjr6hke8loqsoxNsVK+o9OThgby0fxjMkeI=; b=Xvlo/hKvjHPCWeZf VfwObwOPAE7skCV9LQuY9sh+IRB2YC5WttMB9v9mfTDlnHw43Oak2ru0iRyKh0zZ jPYOcdNcRs2zm/hnZEyWvVnwKtwhj0mLAEt9rodsUFbpCBBky81BflZQunJKzWqM xONTfA23CSJfp9CgWqJaFxX/hzeW9TrHj2+Bhf4Bjz278gAb0ba15hhVopopmdDT IvR6LC+jQFxnjoydVFOc77MXf4rTfhIRLC2OkYvYenRlmruj8s/9UuBe4yAxiuKr a/qVXB0oHN7fPFox54KYH9cU3cOf83HMX9wWQucWo347Wdr38+NwZsFovC0L0z2S 6YldMw== Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dfevtn51v-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 13 Apr 2026 11:43:53 +0000 (GMT) Received: by mail-qt1-f200.google.com with SMTP id d75a77b69052e-50d9f1bccd7so5754791cf.1 for ; Mon, 13 Apr 2026 04:43:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1776080633; x=1776685433; 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=Vyq8cBSbpjr6hke8loqsoxNsVK+o9OThgby0fxjMkeI=; b=ZwwXgWNm3ZaQ5/euKF9VyIR9Hlr1EUnGbADOKusUkUOkFh7ka6fkc1CY8HTIiiCdLL E652bzGvtwzLPsRVqCHGeYZ7QhyHukqMBPFSaIBfqWhsegb4tYu0TNWbda3s1k9KMM5a lWEPRL0yvBdQzmoSDZX6F/Rccsq00q3/dzPJHsEmdTDNv/IkE1O3C4XwgRD/zsekSw9i h2sYWUJ+H3ihqN/zhKJjcmjVMWmggZhMDG2X4W5C7jdVpV2PpaWY86JDmxCs3a9+olKU 7olmY3L64oNoAkXEcORUJSY5XjMmFLogYdy/+kKU7FmXaSez4OWBpQlyUwhbx8IghTCa 8y+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776080633; x=1776685433; 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=Vyq8cBSbpjr6hke8loqsoxNsVK+o9OThgby0fxjMkeI=; b=Hp4MeMnNBKyw4sDdyuI/WNMjh7/yoWdB3c0jQo7C3UpIGaXQhvlLAgZ0pT/JJf7Sdg 7g+AY6tp7kKRnzebSmdsutA1KNiRECTBMlR8NBdl88lbi1cLLsvuAkLuUjAWLaf2ng1U uL3UIcX+RNsY99QkPb3YJsdcMRlYARj2U6qOHKbz2rPhaCS674NBnai29YmHk7VJIfTi p9vHcgqLI1VyAyLWph7IOchJTdmVcqlXm7Afc913oSju8uu7fH0ubSrrOvWrQwVwspsK UdeO8gST6FZbRGqLyzhOSmthRK6VbCWlNZ0DHn3nvP3TjhCTfHBdYZwjncKppiYtZmTh vY0w== X-Forwarded-Encrypted: i=1; AFNElJ8MS6epESsSBRYOmIgkaQ9babg0/wp/MCDnmnfm12shQbkmkflqEjcAVI0BW8F27BzeJTwjZ0iVnD5yqc0=@vger.kernel.org X-Gm-Message-State: AOJu0Yw9Mjg1AwfIGc1qVZt7pG8ftfOz5jndGBNtR+LrP4/QjfrqePX9 uCdZbY7ZDrhrsApfz6sKglDoz6+1FX+0yRHFfTZotOE+XPiJpa0Rn99nfvRl6le6PWOuYdTGboJ 1OAtAXwxUDrZwPYeP/iCzTdZW4g8hVJcDO2v6jPW9/uuL57Y+GOD3nC3UAUNXbJ3xkA0= X-Gm-Gg: AeBDievm6Ck0kgRg7r2Z/KrSUvuJRCMLICzVPnasgnKhPp+m/h+DVGusdo8x2smdLnP LuMOFGA+QEyybOIBIizj8ITf4nVM7A4I4OGne4ewTR4TTYDGFxf1LzKha6XZHYd2WK9x6C1MIik sGssrWP9mzdtFMk+ghwHYHGWDu8P+SA2igd1IZhdt+qhL9lknVaPv7B+sb/kQTUMM5iwDlk5xW6 P60qjLJQEDMBSqiXohtw7wJXU1LNZt8dqQMSVgqO7Nfe3xj9mAh2mQ7EjXcklEMnyNRArrvnv+c 8HcQNyraT0tC0O5OuSk22uaJkbrwufDzHisuE2ujA+78+s1SV+DbxPZYgXqvwLP10j1Vx9t8uzk o50uCvKqDLSo6o4EHyPwzJqnrLiCwsl+PIegfkgpXsP52vZPa7j0DfW7TQyq2FrVMosxWa+i94y t+HNc= X-Received: by 2002:ac8:5a53:0:b0:50b:2875:5782 with SMTP id d75a77b69052e-50dd5d40058mr145908431cf.6.1776080632968; Mon, 13 Apr 2026 04:43:52 -0700 (PDT) X-Received: by 2002:ac8:5a53:0:b0:50b:2875:5782 with SMTP id d75a77b69052e-50dd5d40058mr145908181cf.6.1776080632516; Mon, 13 Apr 2026 04:43:52 -0700 (PDT) Received: from [192.168.119.254] (078088045245.garwolin.vectranet.pl. [78.88.45.245]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-670702eec4fsm2433859a12.6.2026.04.13.04.43.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 13 Apr 2026 04:43:51 -0700 (PDT) Message-ID: Date: Mon, 13 Apr 2026 13:43:49 +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 RFC] thunderbolt: Skip reading Rsvd SB registers on older-gen hardware To: Mika Westerberg , Konrad Dybcio Cc: Andreas Noever , Mika Westerberg , Yehezkel Bernat , Greg Kroah-Hartman , Gil Fine , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org References: <20260413-topic-usb4_limit_sb_reads-v1-1-778a6eb37f7b@oss.qualcomm.com> <20260413114015.GO3552@black.igk.intel.com> Content-Language: en-US From: Konrad Dybcio In-Reply-To: <20260413114015.GO3552@black.igk.intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Authority-Analysis: v=2.4 cv=RYWgzVtv c=1 sm=1 tr=0 ts=69dcd6f9 cx=c_pps a=JbAStetqSzwMeJznSMzCyw==:117 a=FpWmc02/iXfjRdCD7H54yg==:17 a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=EUspDBNiAAAA:8 a=rX3LUgZ8ABPdRQFCJgUA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=uxP6HrT_eTzRwkO_Te1X:22 X-Proofpoint-GUID: dJ72of2d5Ff8j2pQkhLhRF7DpK1c7K96 X-Proofpoint-ORIG-GUID: dJ72of2d5Ff8j2pQkhLhRF7DpK1c7K96 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDEzMDExNSBTYWx0ZWRfX/fEsLuxN6JcU UPrH2VKHiOhzSSwGafXF/Gjl8KmD+cRY0mRCUW3pPtC7bk9Dg9doWKzBzf7Ks7/JSoyQX67dGsx cj9FdPHH8Pakcf2AC2ESlmtszkZRD8LN4JyTCFCR9E8xmtcVDrUKCanHy5CzNWjE5pq66CQRCTj 2js+gDLW/kcbSbsTeVXvFPPl0QZPIVBJTcA2LGn/lujaFprljECqjdJOfm4ax+ucJNJ2++I1+6l CyPuf5nXjZiOy/+PLShW7Nup/pflzVOMbEEgNVTIqlMyh4NrGAP3VOYhVusQkl6Y0/L0832YqYo OYTykdT6q2Tn/KRgBUb2dn+s/vPyBjKs0Q9nGjrwdyxrECEuhiGNym1Dx98MQjrUyHS4d4IPJOh G98ZsBIIiFKpJm2/+zGHGAhz8bEeAH0Pe8Gjc4B+3O1Hw8/4w8VoxKYzZz0eyh9CtV/8MmWVUxi MnKK3NRdVBXMuujAjFA== 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-13_03,2026-04-13_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 bulkscore=0 spamscore=0 impostorscore=0 phishscore=0 clxscore=1015 suspectscore=0 priorityscore=1501 adultscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604010000 definitions=main-2604130115 On 4/13/26 1:40 PM, Mika Westerberg wrote: > On Mon, Apr 13, 2026 at 12:54:41PM +0200, Konrad Dybcio wrote: >> From: Konrad Dybcio >> >> The Linux TBT subsystem supports hardware aligned with the latest >> USB4 v2.0 specification. In some places though, it assumes registers >> only defined in that specification version (previously marked as >> Reserved) are always accessible. >> >> Every version of the spec states: >> >> """ >> Unless specified otherwise, the Connection Manager shall not write a >> register with a value that is marked as “Rsvd”. Writing a register with >> a value that is marked as “Rsvd” results in undefined behavior. >> """ >> >> The effective list of SB registers that need this guarding currently >> exclusively contains ones that aren't used outside the debugfs dump >> logic, so just add the required checks there. >> >> Fixes: 54e418106c76 ("thunderbolt: Add debugfs interface") >> Signed-off-by: Konrad Dybcio >> --- >> drivers/thunderbolt/debugfs.c | 20 ++++++++++++-------- >> drivers/thunderbolt/retimer.c | 11 ++++++++++- >> drivers/thunderbolt/sb_regs.h | 11 ++++++----- >> drivers/thunderbolt/tb.h | 2 ++ >> 4 files changed, 30 insertions(+), 14 deletions(-) > > This is alternative for the v2 patch you sent earlier, right? I prefer that > one over this. I think they're complementary. This patch ensures compliance with the quoted part of the spec, while the other one improves the UX and aids debugging. Konrad