All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lukas Wunner <lukas@wunner.de>
To: Sinan Kaya <okaya@kernel.org>
Cc: linux-pci@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Oza Pawandeep <poza@codeaurora.org>,
	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:30:46 +0200	[thread overview]
Message-ID: <20180806093046.GB28462@wunner.de> (raw)
In-Reply-To: <20180805225136.5800-2-okaya@kernel.org>

On Sun, Aug 05, 2018 at 03:51:36PM -0700, Sinan Kaya wrote:
> --- a/drivers/pci/hotplug/pciehp_ctrl.c
> +++ b/drivers/pci/hotplug/pciehp_ctrl.c
> @@ -222,9 +222,28 @@ void pciehp_handle_disable_request(struct slot *slot)
>  void pciehp_handle_presence_or_link_change(struct slot *slot, u32 events)
>  {
>  	struct controller *ctrl = slot->ctrl;
> +	struct pci_dev *pdev = ctrl->pcie->port;
>  	bool link_active;
>  	u8 present;
>  
> +	/* If a fatal error is pending, wait for AER or DPC to handle it. */
> +	if (pcie_fatal_error_pending(pdev, PCI_ERR_UNC_SURPDN)) {
> +		bool recovered;
> +
> +		recovered = pcie_wait_fatal_error_clear(pdev,
> +						PCI_ERR_UNC_SURPDN);
> +
> +		/* If the fatal error is gone and the link is up, return */
> +		if (recovered && pcie_wait_for_link(pdev, true)) {
> +			ctrl_info(ctrl, "Slot(%s): Ignoring Link event due to successful fatal error recovery\n",
> +				  slot_name(slot));
> +			return;
> +		}
> +
> +		ctrl_info(ctrl, "Slot(%s): Fatal error recovery failed for Link event, tryig hotplug reset\n",

Typo tryig -> trying.  Otherwise this is

Reviewed-by: Lukas Wunner <lukas@wunner.de>

  parent reply	other threads:[~2018-08-06 11:39 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
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 [this message]
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=20180806093046.GB28462@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.