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 8FB273B442B for ; Tue, 12 May 2026 13:07:03 +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=1778591224; cv=none; b=PQwaAIOF9CMDgqtTi1XsJCSfshhzSwe2lrkKLWsGCFyRBPTpgkHpfXF+8peWraNR8ear7Nh+9Nb5nxRfHn7rocNrMsTg2folJTSBHbTFnZwf6H+ekLZQVeYfJ7lWB38mDVFZnAMtwATSASRzv4eYtB10ax0JlV2syNMC3uOC/kU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778591224; c=relaxed/simple; bh=/g367lhKepjdqg5B7eVRgMaYc6ku4HfgsOSYrZxuo4w=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=BeA7CXIbkqRcwTTMoGo4412p2gHskQY2801zV8oy00OiqcLNYl7g1Me2lyTY/15GdpZwcP2NobMG9vu3MxV+yVfmzTND2kze9d6ptwIRn5bhKygn5Q/3noN9OjU9Z12/5ZmIdmv9me37SGeVbImJg0SGrqFl8YBNGgEoI0+spYw= 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=Wk9x9yyl; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=WlOVUbwh; 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="Wk9x9yyl"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="WlOVUbwh" Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 64CCgsRw1409943 for ; Tue, 12 May 2026 13:07:03 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= W4fS0akUq6FNrdDlhGRtC55vg2avDag85vDl7LOzXYE=; b=Wk9x9yylz+r9c5VC CR3bZHnMMhszgnSIQ1QwAE3oUX02I8H6GLa7dxsYM0rpfRJUt7p+aWShamS2/oO5 d3RPYMroYs9+OsR/R6mQz+aO3+ms/siOV3z9i1FnMVZ3PJoTZXy1+MOXnapKAIHu hylZ0xY0pIEjKYw6d8jTn8tM9/MuwaGWV4YKTFOS71fEFNrGfk33i29ytu+aGGxf mvp9RD67CHyCDMXo3cSaU2P789baWiHaCkvwAMH3wyCViUHX4LzpM8Nbe6ab1/2S E2JbXWC1ssjhOwHRyUNFRwcXHuhkYTh55aR9pqoxU+N7J/Vx8bQkcCmycd3pf0ZB wFIc8w== Received: from mail-ua1-f72.google.com (mail-ua1-f72.google.com [209.85.222.72]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e44f302fw-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 12 May 2026 13:07:02 +0000 (GMT) Received: by mail-ua1-f72.google.com with SMTP id a1e0cc1a2514c-95cd22ec862so324370241.3 for ; Tue, 12 May 2026 06:07:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1778591222; x=1779196022; 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=W4fS0akUq6FNrdDlhGRtC55vg2avDag85vDl7LOzXYE=; b=WlOVUbwhHXzPbONWVKHyWniIkp1YaUYVpXDg0WAGJWVEJb8Rr3S9mhMRZkm5ISb+bi ch/ibrDDPtOrlZXPQBb4SKqJvThL6Od/YyyXYbWP+XBIZsk5qvnFPsohtbB8KTCq195l rsFdP2r79zrFkovDK9ugYJAyg+MramU5muJEb9fxzFySKm+x+wQdjm6BYmB0oPBU8lSH 7P8JtTcs6ZCxV1VIucioVsVeUvgGQfZd6/WQLzACDNIW+NY0dn/Bbw/gHBq9oQhJdIFs 7+w5DiumDBmmjlMSKI0egZ6d2C8mHjNc5XmJLn5kDulFTXvZ0s0DUYtTrvFaNBGH+wu5 1tcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778591222; x=1779196022; 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=W4fS0akUq6FNrdDlhGRtC55vg2avDag85vDl7LOzXYE=; b=Ib1smR7r3iwkeaL9+cPirYCBHL5RKdX7oi6yZV10Wj/buZ+Mwz1ciiVK9ZVjvDmj9b T7B0fOoLn9+Eb5j5ZU2YbgyzbmSC4MO8q22I84b3xT9aRtOgAXRuSYuVhuJdb19a/yrT YyBpSMHtlAbL9I0IVDr35oI7QlFbKxZ0cZUjVTdp8IYGx2Yng5zje9QrzFSPGjf0MD3G tme19IO7pKi+WI4zDXBoSxnmWYBnleOO6oBAlSSvraBeN8uQyiR2B9SWqo6AuBmQ7zRo SrIGzY5LAQ1FbSWOryFtQD88WEpO5sVZ8Dt5XUmjk3+5t2k5QUDYAmxyHoOpNi6wMbdP JFrg== X-Forwarded-Encrypted: i=1; AFNElJ9KIzUMi3Nn8MACy9qWhlA3gFC13EGVvK1LQrvqbyIPbxiPHCI8Peyu1HK4elUPZVS4bXyUDHncD+BUPNw=@vger.kernel.org X-Gm-Message-State: AOJu0Yzx4AAeyvYnHSgqbLqLo/vmFO8py/DUF4vOkAO6uXYRqMu6YSRx jaONyv0ZYYMzdMA0UYAb2qLmtZGfl4Iqkrk/pWFggVnRKNKUphRwLHLo0S+8DqOIX5hoF6EOkuD YTC+k2cmHcpsGcn136c4+mgleQTrhb4u/x1jomBqZA3Ssn5BXpZ3djP3l4c+PYfczNmE= X-Gm-Gg: Acq92OFTwqNUBS9lWYNwWWxDh5/NuLWLSK//lQ2Yq5dvTo0JeoRVFSb9KXPCnYkUOOx e7Es5oop0Y6w5j4vyGmEqoF7ZVBiycu4XlZy1fDWWLUSgQC4BqmRKIs7pi95Xh6mUOV7nOr6ivI n32UOFerj8u7+Xw/kGgrLKv1sHJEcETA9e0eGMAg+WCMYO7bu20LmU7f1W0VHfRIXkj7rplqqvj BCKxnbXgEhkzazqMZ+BFb8ebxiZNqtTkfq4gW2cmAKOjEdyVlAr8xpw8A+XJ36VDgJ7UqYGSpFt 5QnJsVx2avSYf/swBjoCLO+HTLDTA/8ZNjF++Zlv9Bs1P81elUMYXpcXyCCjw/63Lsp/F2q6uGI 50c0kPv66l1yppVpgCmZ2H/4eRkVl1FRr2yxflvAgDWmvAoq8xXiMywypfjqDoLWFZnadj1gLxI TY7yk= X-Received: by 2002:a05:6122:8103:b0:575:dcec:efc1 with SMTP id 71dfb90a1353d-575dcecfb77mr206457e0c.0.1778591221734; Tue, 12 May 2026 06:07:01 -0700 (PDT) X-Received: by 2002:a05:6122:8103:b0:575:dcec:efc1 with SMTP id 71dfb90a1353d-575dcecfb77mr206428e0c.0.1778591221314; Tue, 12 May 2026 06:07:01 -0700 (PDT) Received: from [192.168.119.254] (078088045245.garwolin.vectranet.pl. [78.88.45.245]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-bcac3989fbesm670315566b.33.2026.05.12.06.06.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 12 May 2026 06:07:00 -0700 (PDT) Message-ID: <7aab3f25-7609-499a-b701-8301719b9a82@oss.qualcomm.com> Date: Tue, 12 May 2026 15:06:58 +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 v2 2/4] thunderbolt: Separate out common NHI bits To: Mika Westerberg , Konrad Dybcio Cc: Andreas Noever , Mika Westerberg , Yehezkel Bernat , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, usb4-upstream@oss.qualcomm.com, Raghavendra Thoorpu References: <20260428-topic-usb4_nonpcie_prepwork-v2-0-452fb9d63f77@oss.qualcomm.com> <20260428-topic-usb4_nonpcie_prepwork-v2-2-452fb9d63f77@oss.qualcomm.com> <20260504065402.GB6785@black.igk.intel.com> Content-Language: en-US From: Konrad Dybcio In-Reply-To: <20260504065402.GB6785@black.igk.intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-ORIG-GUID: X3zERwyq2s5V6YYDBC8nuhM7TR4D20tV X-Authority-Analysis: v=2.4 cv=SpSgLvO0 c=1 sm=1 tr=0 ts=6a0325f6 cx=c_pps a=ULNsgckmlI/WJG3HAyAuOQ==:117 a=FpWmc02/iXfjRdCD7H54yg==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_K5XuSEh1TEqbUxoQ0s3:22 a=nyb3a_ycuV9-R_YOpWMA:9 a=QEXdDO2ut3YA:10 a=1WsBpfsz9X-RYQiigVTh:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTEyMDEzNiBTYWx0ZWRfX0KyVDOdrEhf0 9jjdZRdzy/m09E9binYTEFMYTcm3TfWHcKs2qxvpO2N3v+AjYhXtT0b4/SaoPOwXiD8YPv8esV6 EyqsIV6KPQfSJ7sQWfLkVceXXMYy0aBSklovujWtoeyfe+H/ZfSI0vsPJVO/Apq7HT+o2tC4UzL 7GPHhysz7XwUgH7xjOG69zMnzxBwL6/+tOmWyshehiX05sHtlklE0ukimH7BO6nFaDHfVZXaZCi +XENkGK1imjFy+xyh3ssJ0c1Bj68ELqKiksFYcJbf11+fgLA6NsyrLxXwwnHLWoBNRsJzaJ77zZ 9+xTUI9nC8EdQ+DMIr6RSgt44p3on212DV8/qlecaV5peV9AYCSteyXfnhEw0Geov9/Ebant5ry m7unh7i3jSZKE+LPFyROd6rToCSK7AuIEWAHBpLMqMCWgOq3p+ngBKDBfc8HEI8A96w7V2i2ScF 7iF+3g4Y/jATEo+1Jug== X-Proofpoint-GUID: X3zERwyq2s5V6YYDBC8nuhM7TR4D20tV 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-11_05,2026-05-08_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 malwarescore=0 suspectscore=0 impostorscore=0 bulkscore=0 spamscore=0 phishscore=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-2605050000 definitions=main-2605120136 On 5/4/26 8:54 AM, Mika Westerberg wrote: > Hi, [...] >> +void nhi_pci_shutdown(struct tb_nhi *nhi) > > Why these are not static? [...] >> +static const struct tb_nhi_ops pci_nhi_default_ops = { >> + .pre_nvm_auth = nhi_pci_start_dma_port, >> + .post_nvm_auth = nhi_pci_complete_dma_port, >> + .request_ring_irq = nhi_pci_ring_request_msix, >> + .release_ring_irq = nhi_pci_ring_release_msix, >> + .shutdown = nhi_pci_shutdown, >> + .is_present = nhi_pci_is_present, >> + .init_interrupts = nhi_pci_init_msi, > > You populate them here so there is no need to expose outside of pci.c. nhi_ops.c needs them too, as they were previously called unconditionally for all NHI flavors [...] >> +/* >> + * During suspend the Thunderbolt controller is reset and all PCIe >> + * tunnels are lost. The NHI driver will try to reestablish all tunnels >> + * during resume. This adds device links between the tunneled PCIe >> + * downstream ports and the NHI so that the device core will make sure >> + * NHI is resumed first before the rest. >> + */ >> +bool tb_apple_add_links(struct tb_nhi *nhi) > > Okay you moved it here good. I think we can call it in nhi_pci_probe() > directly so no need to expose outside. Yeah that seems like a good idea. It's already there, behind N calls in the software CM case. Do we have to check the CM type though, or do you think it'd be fine to just call it unconditionally? (either because there are presumably no Apple machines with ICM or because these devlinks would be harmless?) (ack for all the remaining comments) Konrad