mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Atharva Tiwari <atharvatiwarilinuxdev@gmail.com>
Cc: Andre Eikmeyer <andre@negmaster.com>,
	Andreas Noever <andreas.noever@gmail.com>,
	Mika Westerberg <westeri@kernel.org>,
	Yehezkel Bernat <YehezkelShB@gmail.com>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6] thunderbolt: Add device links for Apple T2 NHI
Date: Fri, 31 Jul 2026 07:49:48 +0200	[thread overview]
Message-ID: <2026073154-swoop-outer-70b3@gregkh> (raw)
In-Reply-To: <20260730223435.2874-1-atharvatiwarilinuxdev@gmail.com>

On Thu, Jul 30, 2026 at 06:34:33PM -0400, Atharva Tiwari wrote:
> Ice Lake Thunderbolt NHI That are only on T2 Macs. The NHI and its
> associated PCIe Root Ports all sit directly on the Root Complex
> with no upstream port. Identify the tunneled PCIe Root Ports by
> their PCI IDs and create device links back to the NHI so that
> PCIe tunnels can be re-established after sleep.
> 
> And on other Thunderbolt NHI's, like Titan Ridge, the default method
> is used to add device links.
> 
> Co-developed-by: Andre Eikmeyer <andre@negmaster.com>
> Signed-off-by: Andre Eikmeyer <andre@negmaster.com>
> 
> Signed-off-by: Atharva Tiwari <atharvatiwarilinuxdev@gmail.com>

No blank line here please.

> 
> Changes in v6:
> - Used for_each_pci_bridge in Icelake section
> - Removed has_apple_t2_chip as its not required now

These "Changes in" go below the --- line, right?


> +	/* Identify the tunneled PCIe Root Ports by their PCI IDs
> +	 * on Macs with Icelake NHI's
> +	 * and create device links so that
> +	 * PCIe tunnels can be re-established after sleep.
> +	 */
> +	if (nhi->pdev->device == PCI_DEVICE_ID_INTEL_ICL_NHI0 ||
> +		nhi->pdev->device == PCI_DEVICE_ID_INTEL_ICL_NHI1) {
> +		const struct device_link *link;
> +
> +		for_each_pci_bridge(pdev, nhi->pdev->bus) {

How are you able to walk all pci bridges of a pci device without a lock?

> +			if (!pci_is_pcie(pdev) || pci_pcie_type(pdev) != PCI_EXP_TYPE_ROOT_PORT)
> +				continue;
> +
> +			switch (pdev->device) {
> +			case 0x8a1d:
> +			case 0x8a1f:
> +			case 0x8a21:
> +			case 0x8a23:

What are these numbers, shouldn't they be a define?

thanks,

greg k-h

      reply	other threads:[~2026-07-31  5:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-30 22:34 Atharva Tiwari
2026-07-31  5:49 ` Greg KH [this message]

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=2026073154-swoop-outer-70b3@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=YehezkelShB@gmail.com \
    --cc=andre@negmaster.com \
    --cc=andreas.noever@gmail.com \
    --cc=atharvatiwarilinuxdev@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®