Linux PCI subsystem development
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: stuck-tamer-growl@duck.com, Sanath S <Sanath.S@amd.com>,
	 Mario Limonciello <mario.limonciello@amd.com>,
	 Mika Westerberg <mika.westerberg@linux.intel.com>,
	 Bjorn Helgaas <helgaas@kernel.org>
Cc: "bjorn@helgaas.com" <bjorn@helgaas.com>,
	 Linux PCI <linux-pci@vger.kernel.org>
Subject: Re: Fwd: [Bug 221457] New: PCI core drops Resizable BAR sizing after ASPM common-clock reconfiguration on Thunderbolt/USB4 hot-plug link
Date: Wed, 6 May 2026 15:26:43 +0300 (EEST)	[thread overview]
Message-ID: <8ad6c6c8-48e4-b276-e639-ae9362cc7eff@linux.intel.com> (raw)
In-Reply-To: <F2774784-D1E3-46C2-8A6A-CC8932884D5F.1@smtp-inbound1.duck.com>

On Wed, 6 May 2026, stuck-tamer-growl@duck.com wrote:

> Bjorn and All,
> 
> Attached 
> 
> pristine.dmesg.txt and pristine.lspci-vv.txt                                                                  
> cmdline "quiet splash", same kernel/hardware as the report.                                                                    
>                                                                                                                                         
> Many thanks!
> 
> Peter / stuck-tamer-growl
> 
> 
> 
> On Monday, May 4th, 2026 at 2:43 PM, Bjorn Helgaas <helgaas_at_kernel.org_stuck-tamer-growl@duck.com> wrote:
> 
> > [+bcc reporter]
> > 
> > On Mon, May 04, 2026 at 01:29:28PM -0500, Bjorn Helgaas wrote:
> > > ---------- Forwarded message ---------
> > > https://bugzilla.kernel.org/show_bug.cgi?id=221457
> > > ...
> > > SUMMARY
> > >
> > > Initial PCI enumeration assigns BAR 1 = 16 GB on an RTX 5060 Ti behind a
> > > Thunderbolt 4 link. Shortly after, the pcieport ASPM service runs a
> > > common-clock reconfigure on the host root port, the downstream bridges go
> > > through [bus 00-00] reset and re-enumeration, and BAR 1 is reassigned at 256
> > > MB.
> > 
> > stuck-tamer-growl: Thanks for the report.  Would you mind collect the
> > complete dmesg log and the output of "sudo lspci -vv" and posting them
> > here (or in the bugzilla if you prefer)?

Hi,

To me it looks the ASPM/CCC is a red herring (or another problem unrelated 
to the ReBAR size issue).

What happens here is the entire PCIe topology is reset:

[    1.121434] kernel: pcieport 0000:00:07.2: pciehp: Slot(14): Link Down
[    1.121439] kernel: pcieport 0000:00:07.2: pciehp: Slot(14): Card not present
[    5.804638] kernel: pcieport 0000:00:07.2: pciehp: Slot(14): Card present
[    5.804643] kernel: pcieport 0000:00:07.2: pciehp: Slot(14): Link Up

I recalled Mika Westerberg mentioned some time back Thunderbolt is 
starting to reset things on boot so this might be related to that.

As the hotplug tears down everything on PCI side, there's nothing to hold 
the ReBAR size information across as far as PCI core is concerned.

Thunderbolt reset on boot was (probably) introduced by this commit:

59a54c5f3dbd ("thunderbolt: Reset topology created by the boot firmware")


I don't know if the nvidia out-of-tree driver does attempt BAR resize on 
its own (some in-kernel GPU driver do on their own outside of PCI core's 
resource fitting algorithm). At least there's no indication in the log 
that would point to even a resize attempt happening.


My resizable BAR aware resource fitting would eventually solve this but 
it's not yet ready. I'm currently trying to fix pci=realloc not detecting 
need to resize anything if the current ReBAR size fits just fine.


-- 
 i.


  reply	other threads:[~2026-05-06 12:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-221457-41252@https.bugzilla.kernel.org/>
2026-05-04 18:29 ` Fwd: [Bug 221457] New: PCI core drops Resizable BAR sizing after ASPM common-clock reconfiguration on Thunderbolt/USB4 hot-plug link Bjorn Helgaas
2026-05-04 18:43   ` Bjorn Helgaas
     [not found]     ` <AB2EBCFC-663F-48A1-9C11-2DFB7C844B19.1@smtp-inbound1.duck.com>
2026-05-06  5:09       ` stuck-tamer-growl
2026-05-06 12:26         ` Ilpo Järvinen [this message]
2026-05-06 12:38           ` Mika Westerberg
2026-05-06 13:07             ` Mario Limonciello
2026-05-06 14:44               ` Mika Westerberg

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=8ad6c6c8-48e4-b276-e639-ae9362cc7eff@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=Sanath.S@amd.com \
    --cc=bjorn@helgaas.com \
    --cc=helgaas@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=mika.westerberg@linux.intel.com \
    --cc=stuck-tamer-growl@duck.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