linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel.org>
To: Hinko Kocevar <hinko.kocevar@ess.eu>
Cc: Bjorn Helgaas <helgaas@kernel.org>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>
Subject: Re: Recovering from AER: Uncorrected (Fatal) error
Date: Wed, 16 Dec 2020 03:56:18 +0900	[thread overview]
Message-ID: <20201215185618.GC22809@redsun51.ssa.fujisawa.hgst.com> (raw)
In-Reply-To: <0def63a9-9a9e-440c-6bd8-7fd8dfef5b63@ess.eu>

On Tue, Dec 15, 2020 at 01:56:21PM +0100, Hinko Kocevar wrote:
> I noticed the change you are pointing out when trying to propose a patch.
> 
> It made me curious on why the pcie_portdrv_slot_reset() is not invoked.
> 
> After sprinkling a couple of printk()'s around the pcie_do_recovery() and
> pcie_portdrv_err_handler's I can observe that the pcie_portdrv_slot_reset()
> is never called from pcie_do_recovery() due to status returned by
> reset_subordinates() (actually aer_root_reset() from pcie/aer.c) being
> PCI_ERS_RESULT_RECOVERED.
> 
> I reckon, in order to invoke the pcie_portdrv_slot_reset(), the
> aer_root_reset() should have returned PCI_ERS_RESULT_NEED_RESET.
> 
> As soon as I plug the calls to pci_restore_state() and pci_save_state() into
> the pcie_portdrv_err_resume() the bus and devices are operational again.

It appears some sequences in the aer handling are out of sync with at
least a few driver's expectations. The .slot_reset callback is for when
'PCI slot has been reset' according the the code comments, so we should
be calling this after the reset to notify driver's of downstream devices
that event occured. I'll mess with it a bit and see if we can get
everyone aligned.

      reply	other threads:[~2020-12-15 18:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-04 12:52 Recovering from AER: Uncorrected (Fatal) error Hinko Kocevar
2020-12-04 22:38 ` Bjorn Helgaas
2020-12-09 10:02   ` Hinko Kocevar
2020-12-09 17:40     ` Bjorn Helgaas
2020-12-09 20:31       ` Hinko Kocevar
2020-12-09 20:50       ` Hinko Kocevar
2020-12-09 21:32         ` Bjorn Helgaas
2020-12-09 22:55           ` Hinko Kocevar
2020-12-10 12:56             ` Hinko Kocevar
2020-12-14 21:23             ` Keith Busch
2020-12-15 12:56               ` Hinko Kocevar
2020-12-15 18:56                 ` Keith Busch [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=20201215185618.GC22809@redsun51.ssa.fujisawa.hgst.com \
    --to=kbusch@kernel.org \
    --cc=helgaas@kernel.org \
    --cc=hinko.kocevar@ess.eu \
    --cc=linux-pci@vger.kernel.org \
    /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).