From: Lukas Wunner <lukas@wunner.de>
To: poza@codeaurora.org
Cc: Sinan Kaya <okaya@kernel.org>,
linux-pci@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Keith Busch <keith.busch@intel.com>
Subject: Re: [PATCH v7 1/1] PCI: pciehp: Ignore link events when there is a fatal error pending
Date: Mon, 6 Aug 2018 11:26:14 +0200 [thread overview]
Message-ID: <20180806092614.GA28462@wunner.de> (raw)
In-Reply-To: <c1cfff22c63f6d3d6285575721a2a3e8@codeaurora.org>
On Mon, Aug 06, 2018 at 01:21:03PM +0530, poza@codeaurora.org wrote:
> On 2018-08-06 04:21, Sinan Kaya wrote:
> >+bool pcie_wait_fatal_error_clear(struct pci_dev *pdev, u32 usrmask)
> >+{
> >+ int timeout = 1000;
> >+ bool ret;
> >+
> >+ for (;;) {
> >+ ret = pcie_fatal_error_pending(pdev, usrmask);
> >+ if (ret == false)
> >+ return true;
> >+ if (timeout <= 0)
> >+ break;
> >+ msleep(20);
> >+ timeout -= 20;
> I assume that this timeout will come into effect if
> 1) AER/DPC takes longer time than 1 sec for recovery.
> 2) Lets us say both AER and DPC are disabled....are we going to wait for
> this timeout before HP can take over ?
If CONFIG_PCIEAER is disabled, pdev->aer_cap will not be set because
it is populated in pci_aer_init().
pcie_fatal_error_pending(), as introduced by this patch, returns false
if pdev->aer_cap is not set. So pciehp will fall back to a cold reset
if CONFIG_PCIEAER is disabled.
I'm not seeing a similar check for CONFIG_PCIE_DPC=n in this patch,
but I'm not familiar enough with PCIe error recovery to know if such
a check is at all needed.
Thanks,
Lukas
next prev parent reply other threads:[~2018-08-06 11:34 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-05 22:51 [PATCH v7 0/1] PCI: Handle conflict between hotplug and error handling Sinan Kaya
2018-08-05 22:51 ` [PATCH v7 1/1] PCI: pciehp: Ignore link events when there is a fatal error pending Sinan Kaya
2018-08-06 7:51 ` poza
2018-08-06 9:26 ` Lukas Wunner [this message]
2018-08-06 14:55 ` poza
2018-08-06 15:04 ` Sinan Kaya
2018-08-06 15:06 ` Sinan Kaya
2018-08-06 15:12 ` poza
2018-08-06 16:34 ` Sinan Kaya
2018-08-06 16:44 ` Lukas Wunner
2018-08-06 16:49 ` Sinan Kaya
2018-08-06 17:03 ` Sinan Kaya
2018-08-06 17:05 ` Lukas Wunner
2018-08-06 17:09 ` Sinan Kaya
2018-08-06 9:30 ` Lukas Wunner
2018-09-04 18:18 ` [PATCH v7 0/1] PCI: Handle conflict between hotplug and error handling Bjorn Helgaas
2018-09-04 18:28 ` Sinan Kaya
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=20180806092614.GA28462@wunner.de \
--to=lukas@wunner.de \
--cc=bhelgaas@google.com \
--cc=keith.busch@intel.com \
--cc=linux-pci@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=okaya@kernel.org \
--cc=poza@codeaurora.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 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.