From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Cc: Konrad Dybcio <konradybcio@kernel.org>,
Andreas Noever <andreas.noever@gmail.com>,
Mika Westerberg <westeri@kernel.org>,
Yehezkel Bernat <YehezkelShB@gmail.com>,
linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
usb4-upstream@oss.qualcomm.com,
Raghavendra Thoorpu <rthoorpu@qti.qualcomm.com>
Subject: Re: [PATCH v2 2/4] thunderbolt: Separate out common NHI bits
Date: Tue, 12 May 2026 15:20:08 +0200 [thread overview]
Message-ID: <20260512132008.GC84797@black.igk.intel.com> (raw)
In-Reply-To: <7aab3f25-7609-499a-b701-8301719b9a82@oss.qualcomm.com>
On Tue, May 12, 2026 at 03:06:58PM +0200, Konrad Dybcio wrote:
> 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
OK.
> [...]
>
>
> >> +/*
> >> + * 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?)
I think you can call it unconditionally. It only does something for TB1-2
Apple systems.
For Apple TB3 we used to start ICM firmware but this was changed as the
driver learned SW CM. However, we never setup any device links so this
would not change anything.
next prev parent reply other threads:[~2026-05-12 13:20 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-28 18:49 [PATCH v2 0/4] Prepwork for non-PCIe NHI/TBT hosts Konrad Dybcio
2026-04-28 18:49 ` [PATCH v2 1/4] thunderbolt: Move pci_device out of tb_nhi Konrad Dybcio
2026-05-04 6:40 ` Mika Westerberg
2026-04-28 18:49 ` [PATCH v2 2/4] thunderbolt: Separate out common NHI bits Konrad Dybcio
2026-05-04 6:54 ` Mika Westerberg
2026-05-12 13:06 ` Konrad Dybcio
2026-05-12 13:20 ` Mika Westerberg [this message]
2026-05-12 13:43 ` Konrad Dybcio
2026-05-12 13:54 ` Mika Westerberg
2026-05-12 13:58 ` Konrad Dybcio
2026-05-12 14:02 ` Mika Westerberg
2026-04-28 18:49 ` [PATCH v2 3/4] thunderbolt: Require nhi->ops be valid Konrad Dybcio
2026-04-28 18:49 ` [PATCH v2 4/4] thunderbolt: Add some more descriptive probe error messages Konrad Dybcio
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260512132008.GC84797@black.igk.intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=YehezkelShB@gmail.com \
--cc=andreas.noever@gmail.com \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=rthoorpu@qti.qualcomm.com \
--cc=usb4-upstream@oss.qualcomm.com \
--cc=westeri@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox