public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Brad Campbell <lists2009@fnarfbargle.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Apple Thunderbolt Display chaining
Date: Mon, 8 Aug 2022 15:42:25 +0300	[thread overview]
Message-ID: <YvEEsWQRUyATQTvX@lahna> (raw)
In-Reply-To: <a1db1454-63b6-7c39-bbf6-53e53bbd36e6@fnarfbargle.com>

Hi,

On Mon, Aug 08, 2022 at 07:55:14PM +0800, Brad Campbell wrote:
> 31:04.0 PCI bridge: Intel Corporation CV82524 Thunderbolt Controller [Light Ridge 4C 2010]

...

> 19:28:44 openat(AT_FDCWD, "/sys/bus/pci/devices/0000:31:04.0/config", O_RDONLY) = 3
> 19:28:44 pread64(3, "\206\200\23\25\7\0\20\0\0\0\4\6\20\0\1\0\0\0\0\0\0\0\0\000177\0\361\1\0\0\360\377\0\0\361\377\1\0\0\0\0\0\0\0\0\0\0\0\0\0\200\0\0\0\0\0\0\0\377\1\2\0", 64, 0) = 64
> 19:28:44 openat(AT_FDCWD, "/sys/bus/pci/devices/0000:31:04.0/vendor", O_RDONLY) = 4
> 19:28:44 read(4, "0x8086\n", 1024)      = 7

...

> 19:29:02 openat(AT_FDCWD, "/sys/bus/pci/devices/0000:31:04.0/config", O_RDONLY) = 3
> 19:29:02 pread64(3, "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377", 64, 0) = 64

It looks like the 31:04 PCIe downstream port and the device below are
not accessible anymore (we read 0xff from the config space if parse the
strace output correctly).

> 19:29:05 openat(AT_FDCWD, "/sys/bus/pci/devices/0000:33:03.0/config", O_RDONLY) = 3
> 19:29:05 pread64(3, "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377", 64, 0) = 64

Same here for the 33:03.

Now, this can happen if the Thunderbolt driver runtime suspends and
there is not device link in place from the TR tunneled PCIe downstream
ports towards the Thunderbolt controller. However, you have the
pcie_port_pm=off that should prevent it from happening (and the
Thunderbolt driver blocks runtime PM on TBT1 devices). Can you modify
drivers/pci/pci.c::pci_bridge_d3_possible() so that it looks like this

bool pci_bridge_d3_possible(struct pci_dev *bridge)
{
#if 0
	...
#else
	return false;
#endif
}

and try if that makes any difference? Probably no but worth a try
anyway.

      parent reply	other threads:[~2022-08-08 12:42 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <acbb3a86-ea15-47ec-90fa-72fbd94921b1@fnarfbargle.com>
2022-03-29 11:31 ` Apple Thunderbolt Display chaining Mika Westerberg
2022-03-29 12:35   ` Brad Campbell
2022-03-29 13:00     ` Mika Westerberg
2022-03-29 14:06       ` Brad Campbell
2022-03-30 10:18         ` Mika Westerberg
2022-03-30 13:19           ` Brad Campbell
2022-03-30 13:43             ` Mika Westerberg
2022-03-30 14:24               ` Brad Campbell
2022-03-30 14:47                 ` Mika Westerberg
2022-03-31  9:02                   ` Brad Campbell
2022-03-31 16:36                     ` Mika Westerberg
2022-04-01  5:48                       ` Brad Campbell
2022-04-01 14:30                         ` Mika Westerberg
2022-04-01 15:05                           ` Brad Campbell
2022-04-04 10:10                             ` Mika Westerberg
2022-04-04 11:38                               ` Brad Campbell
2022-04-04 12:53                                 ` Mika Westerberg
2022-04-06  2:51                                   ` Brad Campbell
2022-04-06 14:56                                     ` Mika Westerberg
2022-08-05  7:41                                       ` Brad Campbell
2022-08-05 11:30                                         ` Mika Westerberg
2022-08-05 12:43                                           ` Brad Campbell
2022-08-05 13:01                                             ` Mika Westerberg
2022-08-05 14:13                                               ` Brad Campbell
2022-08-05 14:21                                                 ` Mika Westerberg
2022-08-05 14:43                                                   ` Brad Campbell
2022-08-06  6:13                                                     ` Mika Westerberg
2022-08-06  9:41                                                       ` Brad Campbell
2022-08-08  9:51                                                         ` Mika Westerberg
2022-08-08 11:55                                                           ` Brad Campbell
2022-08-08 12:25                                                             ` Brad Campbell
2022-08-08 12:46                                                               ` Mika Westerberg
2022-08-08 13:27                                                                 ` Brad Campbell
2022-08-09 10:23                                                                   ` Mika Westerberg
2022-08-09 10:40                                                                     ` Brad Campbell
2022-08-09 10:55                                                                       ` Mika Westerberg
2022-08-09 11:03                                                                         ` Brad Campbell
2022-08-09 11:08                                                                         ` Brad Campbell
2022-08-09 14:42                                                                           ` Mika Westerberg
2022-08-09 15:16                                                                             ` Brad Campbell
2022-08-09 15:50                                                                               ` Mika Westerberg
2022-08-10  7:40                                                                                 ` Brad Campbell
2022-08-11  9:50                                                                                   ` Mika Westerberg
2022-08-11 14:17                                                                                     ` Brad Campbell
2022-08-12  9:35                                                                                       ` Mika Westerberg
2022-08-12 10:16                                                                                         ` Brad Campbell
2022-08-08 12:42                                                             ` Mika Westerberg [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=YvEEsWQRUyATQTvX@lahna \
    --to=mika.westerberg@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lists2009@fnarfbargle.com \
    /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