From: Sinan Kaya <okaya@kernel.org>
To: Keith Busch <keith.busch@intel.com>,
Linux PCI <linux-pci@vger.kernel.org>,
Bjorn Helgaas <bhelgaas@google.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Thomas Tai <thomas.tai@oracle.com>,
poza@codeaurora.org, Lukas Wunner <lukas@wunner.de>,
Christoph Hellwig <hch@lst.de>,
Mika Westerberg <mika.westerberg@linux.intel.com>
Subject: Re: [PATCHv3 10/10] PCI: Make link active reporting detection generic
Date: Wed, 19 Sep 2018 12:46:58 -0400 [thread overview]
Message-ID: <196cd477-ad06-a75b-a013-6c5c231419a3@kernel.org> (raw)
In-Reply-To: <f695a8f4-a359-389f-b27e-c1d998a50b0b@kernel.org>
On 9/19/2018 12:42 PM, Sinan Kaya wrote:
> On 9/18/2018 7:57 PM, Keith Busch wrote:
>> +++ b/drivers/pci/pcie/dpc.c
>> @@ -93,10 +93,12 @@ static pci_ers_result_t dpc_reset_link(struct pci_dev *pdev)
>> pci_write_config_word(pdev, cap + PCI_EXP_DPC_STATUS,
>> PCI_EXP_DPC_STATUS_TRIGGER);
>> + if (!pcie_wait_for_link(pdev, true))
>> + return PCI_ERS_RESULT_DISCONNECT;
>> +
>
> We are already doing this in err.c in pcie_do_fatal_recovery() as follows.
>
> result = reset_link(udev, service);
> ...
> if (result == PCI_ERS_RESULT_RECOVERED) {
> if (pcie_wait_for_link(udev, true))
> pci_rescan_bus(udev->bus);
> pci_info(dev, "Device recovery from fatal error successful\n");
> }
>
> This would be an unnecessary duplication.
>
> You may want to move this piece into err.c and change the return code to
> PCI_ERS_RESULT_DISCONNECT
> right after return from reset_link().
>
>> return PCI_ERS_RESULT_RECOVERED;
>> }
>> -
>
Nevermind. I just realized that you unified error recovery handlers into
pcie_do_recovery().
Please disregard this comment.
prev parent reply other threads:[~2018-09-19 22:25 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-18 23:56 [PATCHv3 00/10] PCI error handling Keith Busch
2018-09-18 23:56 ` [PATCHv3 01/10] PCI/portdrv: Use subsys_init for service drivers Keith Busch
2018-09-19 16:28 ` Bjorn Helgaas
2018-09-19 17:05 ` Keith Busch
2018-09-19 17:05 ` Keith Busch
2018-09-19 18:00 ` Keith Busch
2018-09-19 18:00 ` Keith Busch
2018-09-19 19:40 ` Bjorn Helgaas
2018-09-19 20:17 ` Keith Busch
2018-09-19 20:17 ` Keith Busch
2018-09-18 23:56 ` [PATCHv3 02/10] PCI/portdrv: Restore pci state on slot reset Keith Busch
2018-09-18 23:56 ` [PATCHv3 03/10] PCI/AER: Take reference on error devices Keith Busch
2018-09-18 23:56 ` [PATCHv3 04/10] PCI/ERR: Use slot reset if available Keith Busch
2018-09-18 23:56 ` [PATCHv3 05/10] PCI/ERR: Handle fatal error recovery Keith Busch
2018-09-19 15:46 ` Bjorn Helgaas
2018-09-19 15:52 ` Keith Busch
2018-09-19 15:52 ` Keith Busch
2018-09-18 23:56 ` [PATCHv3 06/10] PCI/ERR: Always use the first downstream port Keith Busch
2018-09-18 23:56 ` [PATCHv3 07/10] PCI/ERR: Simplify broadcast callouts Keith Busch
2018-09-18 23:57 ` [PATCHv3 08/10] PCI/ERR: Report current recovery status for udev Keith Busch
2018-09-18 23:57 ` [PATCHv3 09/10] PCI: Unify device inaccessible Keith Busch
2018-09-25 1:10 ` Benjamin Herrenschmidt
2018-09-25 15:35 ` Keith Busch
2018-09-25 19:28 ` Benjamin Herrenschmidt
2025-04-18 3:55 ` Lukas Wunner
2018-09-18 23:57 ` [PATCHv3 10/10] PCI: Make link active reporting detection generic Keith Busch
2018-09-19 16:42 ` Sinan Kaya
2018-09-19 16:46 ` Sinan Kaya [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=196cd477-ad06-a75b-a013-6c5c231419a3@kernel.org \
--to=okaya@kernel.org \
--cc=benh@kernel.crashing.org \
--cc=bhelgaas@google.com \
--cc=hch@lst.de \
--cc=keith.busch@intel.com \
--cc=linux-pci@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=mika.westerberg@linux.intel.com \
--cc=poza@codeaurora.org \
--cc=thomas.tai@oracle.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).