From: Sinan Kaya <firstname.lastname@example.org>
To: email@example.com, firstname.lastname@example.org
Cc: email@example.com, firstname.lastname@example.org,
Subject: Re: [PATCH v4 2/2] PCI/ERR: Split the fatal and non-fatal error recovery handling
Date: Mon, 12 Oct 2020 10:50:29 -0400 [thread overview]
Message-ID: <email@example.com> (raw)
On 10/12/2020 1:03 AM, firstname.lastname@example.org wrote:
> From: Kuppuswamy Sathyanarayanan <email@example.com>
> Commit bdb5ac85777d ("PCI/ERR: Handle fatal error recovery")
> merged fatal and non-fatal error recovery paths, and also made
> recovery code depend on hotplug handler for "remove affected
> device + rescan" support. But this change also complicated the
> error recovery path and which in turn led to the following
> 1. We depend on hotplug handler for removing the affected
> devices/drivers on DLLSC LINK down event (on DPC event
> trigger) and DPC handler for handling the error recovery. Since
> both handlers operate on same set of affected devices, it leads
> to race condition, which in turn leads to NULL pointer
> exceptions or error recovery failures.You can find more details
> about this issue in following link.
> 2. For non-hotplug capable devices fatal (DPC) error recovery
> is currently broken. Current fatal error recovery implementation
> relies on PCIe hotplug (pciehp) handler for detaching and
> re-enumerating the affected devices/drivers. So when dealing with
> non-hotplug capable devices, recovery code does not restore the state
> of the affected devices correctly. You can find more details about
> this issue in the following links.
> In order to fix the above two issues, we should stop relying on hotplug
> handler for cleaning the affected devices/drivers and let error recovery
> handler own this functionality. So this patch reverts Commit bdb5ac85777d
> ("PCI/ERR: Handle fatal error recovery") and re-introduce the "remove
> affected device + rescan" functionality in fatal error recovery handler.
> Also holding pci_lock_rescan_remove() will prevent the race between hotplug
> and DPC handler.
> Fixes: bdb5ac85777d ("PCI/ERR: Handle fatal error recovery")
> Signed-off-by: Kuppuswamy Sathyanarayanan <firstname.lastname@example.org>
> Documentation/PCI/pci-error-recovery.rst | 47 ++++++++++------
> drivers/pci/pcie/err.c | 71 +++++++++++++++++++-----
> 2 files changed, 87 insertions(+), 31 deletions(-)
I'm not sure about locks involved but I do like the concept.
Current fatal error handling is best effort.
There is no way to recover if link is down by the time we
reach to fatal error handling routine.
This change will make the solution more reliable.
Reviewed-by: Sinan Kaya <email@example.com>
next prev parent reply other threads:[~2020-10-12 14:50 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-12 5:03 [PATCH v4 1/2] PCI/ERR: Call pci_bus_reset() before calling ->slot_reset() callback sathyanarayanan.nkuppuswamy
2020-10-12 5:03 ` [PATCH v4 2/2] PCI/ERR: Split the fatal and non-fatal error recovery handling sathyanarayanan.nkuppuswamy
2020-10-12 14:50 ` Sinan Kaya [this message]
2020-10-13 11:56 ` Christoph Hellwig
2020-10-13 15:17 ` Kuppuswamy, Sathyanarayanan
2020-10-15 6:43 ` Christoph Hellwig
2020-10-15 6:49 ` Sathyanarayanan Kuppuswamy Natarajan
2020-10-14 5:44 ` Ethan Zhao
2020-10-14 5:51 ` Kuppuswamy, Sathyanarayanan
2020-10-12 14:51 ` [PATCH v4 1/2] PCI/ERR: Call pci_bus_reset() before calling ->slot_reset() callback Sinan Kaya
2020-10-12 21:05 ` Raj, Ashok
2020-10-12 21:47 ` Kuppuswamy, Sathyanarayanan
2020-10-14 8:00 ` Ethan Zhao
2020-10-14 8:19 ` Kuppuswamy, Sathyanarayanan
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:
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* 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).