linux-fpga.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lukas Wunner <lukas@wunner.de>
To: Keith Busch <kbusch@kernel.org>
Cc: Bjorn Helgaas <helgaas@kernel.org>,
	Sathyanarayanan Kuppuswamy
	<sathyanarayanan.kuppuswamy@linux.intel.com>,
	Yicong Yang <yangyicong@hisilicon.com>,
	linux-pci@vger.kernel.org,
	Stuart Hayes <stuart.w.hayes@gmail.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Ilpo Jarvinen <ilpo.jarvinen@linux.intel.com>,
	Joel Mathew Thomas <proxy0@tutamail.com>,
	Russ Weight <russ.weight@linux.dev>,
	Matthew Gerlach <matthew.gerlach@altera.com>,
	Yilun Xu <yilun.xu@intel.com>,
	linux-fpga@vger.kernel.org, Moshe Shemesh <moshe@nvidia.com>,
	Shay Drory <shayd@nvidia.com>, Saeed Mahameed <saeedm@nvidia.com>,
	Alex Williamson <alex.williamson@redhat.com>
Subject: Re: [PATCH 0/2] Ignore spurious PCIe hotplug events
Date: Wed, 16 Apr 2025 17:06:23 +0200	[thread overview]
Message-ID: <Z__Hb9-GBTkBRRyf@wunner.de> (raw)
In-Reply-To: <Z_7G3rq08FCFU0gy@kbusch-mbp.dhcp.thefacebook.com>

On Tue, Apr 15, 2025 at 02:51:42PM -0600, Keith Busch wrote:
> On Thu, Apr 10, 2025 at 05:27:10PM +0200, Lukas Wunner wrote:
> > First of all, PCIe hotplug is deliberately ignoring link events occurring
> > as a side effect of Downstream Port Containment.  But it's not yet ignoring
> > Presence Detect Changed events.  These can happen if a hotplug bridge uses
> > in-band presence detect.  Reported by Keith Busch, patch [1/2] seeks to
> > fix it.
> 
> There are switches that let you
> toggle downstream connections to change what's attached and it causes a
> DPC event, swapping out the downstream device at the same time. So this
> change has the pci driver resume with the wrong device if you happen to
> be in such a situation. I don't have such switches anymore

What's the error type causing the DPC event?  Surprise Down?

Since commit 2ae8fbbe1cd4 ("PCI/DPC: Ignore Surprise Down error on hot
removal"), which went into v6.9, the DPC driver handles Surprise Down
silently and it tells the hotplug driver *not* to ignore the hotplug
event.  It does that by unconditionally clearing the PCI_DPC_RECOVERED
flag at the end of dpc_handle_surprise_removal().

Hence in the situation you're describing, the hotplug driver should
always bring down the slot and bring it back up with the new device.

Thanks,

Lukas

  reply	other threads:[~2025-04-16 15:06 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-10 15:27 [PATCH 0/2] Ignore spurious PCIe hotplug events Lukas Wunner
2025-04-10 15:27 ` [PATCH 1/2] PCI: pciehp: Ignore Presence Detect Changed caused by DPC Lukas Wunner
2025-04-11  2:34   ` Sathyanarayanan Kuppuswamy
2025-04-11  8:58     ` Lukas Wunner
2025-04-14 13:33   ` Ilpo Järvinen
2025-04-10 15:27 ` [PATCH 2/2] PCI: pciehp: Ignore Link Down/Up caused by Secondary Bus Reset Lukas Wunner
2025-04-11 22:28   ` Sathyanarayanan Kuppuswamy
2025-04-12  3:36     ` Lukas Wunner
2025-04-13 17:21       ` Sathyanarayanan Kuppuswamy
2025-04-13 17:22   ` Sathyanarayanan Kuppuswamy
2025-04-14 13:32   ` Ilpo Järvinen
2025-04-16  8:00   ` Ilpo Järvinen
2025-04-10 22:19 ` [PATCH 0/2] Ignore spurious PCIe hotplug events Bjorn Helgaas
2025-04-15 20:51 ` Keith Busch
2025-04-16 15:06   ` Lukas Wunner [this message]
2025-04-18  1:26     ` Keith Busch

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=Z__Hb9-GBTkBRRyf@wunner.de \
    --to=lukas@wunner.de \
    --cc=alex.williamson@redhat.com \
    --cc=helgaas@kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=kbusch@kernel.org \
    --cc=linux-fpga@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=matthew.gerlach@altera.com \
    --cc=mika.westerberg@linux.intel.com \
    --cc=moshe@nvidia.com \
    --cc=proxy0@tutamail.com \
    --cc=russ.weight@linux.dev \
    --cc=saeedm@nvidia.com \
    --cc=sathyanarayanan.kuppuswamy@linux.intel.com \
    --cc=shayd@nvidia.com \
    --cc=stuart.w.hayes@gmail.com \
    --cc=yangyicong@hisilicon.com \
    --cc=yilun.xu@intel.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;
as well as URLs for NNTP newsgroup(s).