All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Naveen Kumar P <naveenkumar.parna@gmail.com>
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernelnewbies <kernelnewbies@kernelnewbies.org>,
	linux-acpi@vger.kernel.org
Subject: Re: PCI: hotplug_event: PCIe PLDA Device BAR Reset
Date: Fri, 28 Feb 2025 10:01:33 -0600	[thread overview]
Message-ID: <20250228160133.GA51628@bhelgaas> (raw)
In-Reply-To: <CAMciSVUFpkuxt-8MzvsRnM9B8F0UQGjfUxBJufGVK1=m2DooNw@mail.gmail.com>

On Wed, Feb 26, 2025 at 06:28:33PM +0530, Naveen Kumar P wrote:
> On Wed, Feb 26, 2025 at 2:08 AM Bjorn Helgaas <helgaas@kernel.org> wrote:
> > On Tue, Feb 25, 2025 at 06:46:02PM +0530, Naveen Kumar P wrote:
> > > On Tue, Feb 25, 2025 at 1:24 AM Bjorn Helgaas <helgaas@kernel.org> wrote:
> > > > On Tue, Feb 25, 2025 at 12:29:00AM +0530, Naveen Kumar P wrote:
> > > > > On Mon, Feb 24, 2025 at 11:03 PM Bjorn Helgaas <helgaas@kernel.org> wrote:
> > > > > > On Mon, Feb 24, 2025 at 05:45:35PM +0530, Naveen Kumar P wrote:
> > > > > > > On Wed, Feb 19, 2025 at 10:36 PM Bjorn Helgaas <helgaas@kernel.org> wrote:
> > > > > > > > On Wed, Feb 19, 2025 at 05:52:47PM +0530, Naveen Kumar P wrote:
> > > > > > > > > Hi all,
> > > > > > > > >
> > > > > > > > > I am writing to seek assistance with an issue we are
> > > > > > > > > experiencing with a PCIe device (PLDA Device 5555)
> > > > > > > > > connected through PCI Express Root Port 1 to the
> > > > > > > > > host bridge.
> > > > > > > > >
> > > > > > > > > We have observed that after booting the system, the
> > > > > > > > > Base Address Register (BAR0) memory of this device
> > > > > > > > > gets reset to 0x0 after approximately one hour or
> > > > > > > > > more (the timing is inconsistent). This was verified
> > > > > > > > > using the lspci output and the setpci -s 01:00.0
> > > > > > > > > BASE_ADDRESS_0 command.
> > > > > ...

> I have downloaded the 6.13 kernel source and added additional debug
> logs in hotplug_event(), then built the kernel. After that rebooted
> with the new kernel using the following parameters:
> BOOT_IMAGE=/vmlinuz-6.13.0+ root=/dev/mapper/vg00-rootvol ro quiet
> libata.force=noncq pci=nomsi pcie_aspm=off pcie_ports=on "dyndbg=file
> drivers/pci/* +p; file drivers/acpi/* +p"

Why "pci=nomsi"?  I don't think that should make a difference.  Also,
it contributes to the fact that Linux doesn't request OS control of
several features that it ordinarily does, so you end up in a somewhat
unusual state (which *should* still work, of course):

  acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig Segments HPX-Type3]
  acpi PNP0A08:00: _OSC: not requesting OS control; OS requires [ExtendedConfig ASPM ClockPM MSI]

Same for "pcie_aspm=off".

Why "pcie_ports=on"?  That's not a valid parameter:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/pci/pcie/portdrv.c?id=v6.13#n619

> Complete dmesg log and the patch(to get additional debug information)
> are attached to this email.
> 
> Any further guidance on these observations?

I'm out of ideas.  I would instrument the PCI config accessors to log
all the reads and writes to your device (01:00.0) to see what we do to
the device.  Maybe there's some hint:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/pci/access.c?id=v6.13#n35

> Additionally, I noticed that the initial bootup logs with the
> "0.000000" timestamp are missing in the dmesg log with this new
> kernel. I'm unsure what might be causing this issue.

Probably overflowed the message buffer.  You can try increasing the
buffer size:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/admin-guide/kernel-parameters.txt?id=v6.13#n3190

You can also experiment with the dyndbg parameter to be more selective
about the ACPI messages if some aren't useful.

Bjorn

  parent reply	other threads:[~2025-02-28 16:01 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-19 12:22 PCI: hotplug_event: PCIe PLDA Device BAR Reset Naveen Kumar P
2025-02-19 17:06 ` Bjorn Helgaas
2025-02-19 17:06   ` Bjorn Helgaas
2025-02-24 12:15   ` Naveen Kumar P
2025-02-24 17:33     ` Bjorn Helgaas
2025-02-24 17:33       ` Bjorn Helgaas
2025-02-24 18:59       ` Naveen Kumar P
2025-02-24 19:54         ` Bjorn Helgaas
2025-02-24 19:54           ` Bjorn Helgaas
2025-02-25 13:16           ` Naveen Kumar P
2025-02-25 20:38             ` Bjorn Helgaas
2025-02-25 20:38               ` Bjorn Helgaas
2025-02-26 12:58               ` Naveen Kumar P
2025-02-28 12:27                 ` Naveen Kumar P
2025-02-28 16:01                 ` Bjorn Helgaas [this message]
2025-03-04  8:05                   ` Naveen Kumar P
2025-03-04 16:49                     ` Naveen Kumar P
2025-03-04 21:01                       ` Bjorn Helgaas
2025-03-04 21:01                         ` Bjorn Helgaas
2025-03-04 22:44                         ` Naveen Kumar P
2025-03-10 11:23                           ` Naveen Kumar P
2025-03-11 18:04                             ` Naveen Kumar P
2025-03-18 14:07                               ` Naveen Kumar P
2025-03-04 20:45                     ` Bjorn Helgaas
2025-03-04 20:45                       ` Bjorn Helgaas
2025-03-19 14:37       ` Naveen Kumar P
2025-03-19 21:41         ` Bjorn Helgaas
2025-03-19 21:41           ` Bjorn Helgaas
2025-04-02  5:24           ` Naveen Kumar P

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=20250228160133.GA51628@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=naveenkumar.parna@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.