From: "Kuppuswamy, Sathyanarayanan" <sathyanarayanan.kuppuswamy@linux.intel.com>
To: "Raj, Ashok" <ashok.raj@intel.com>,
sathyanarayanan.nkuppuswamy@gmail.com
Cc: bhelgaas@google.com, okaya@kernel.org, linux-pci@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 1/2] PCI/ERR: Call pci_bus_reset() before calling ->slot_reset() callback
Date: Mon, 12 Oct 2020 14:47:03 -0700 [thread overview]
Message-ID: <9b7db59d-832c-1c21-90b6-1676ea9058ce@linux.intel.com> (raw)
In-Reply-To: <20201012210522.GA86612@otc-nc-03>
On 10/12/20 2:05 PM, Raj, Ashok wrote:
> On Sun, Oct 11, 2020 at 10:03:40PM -0700, sathyanarayanan.nkuppuswamy@gmail.com wrote:
>> From: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
>>
>> Currently if report_error_detected() or report_mmio_enabled()
>> functions requests PCI_ERS_RESULT_NEED_RESET, current
>> pcie_do_recovery() implementation does not do the requested
>> explicit device reset, but instead just calls the
>> report_slot_reset() on all affected devices. Notifying about the
>> reset via report_slot_reset() without doing the actual device
>> reset is incorrect. So call pci_bus_reset() before triggering
>> ->slot_reset() callback.
>>
>> Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
>> ---
>> drivers/pci/pcie/err.c | 6 +-----
>> 1 file changed, 1 insertion(+), 5 deletions(-)
>>
>> diff --git a/drivers/pci/pcie/err.c b/drivers/pci/pcie/err.c
>> index c543f419d8f9..067c58728b88 100644
>> --- a/drivers/pci/pcie/err.c
>> +++ b/drivers/pci/pcie/err.c
>> @@ -181,11 +181,7 @@ pci_ers_result_t pcie_do_recovery(struct pci_dev *dev,
>> }
>>
>> if (status == PCI_ERS_RESULT_NEED_RESET) {
>> - /*
>> - * TODO: Should call platform-specific
>> - * functions to reset slot before calling
>> - * drivers' slot_reset callbacks?
>> - */
>> + pci_reset_bus(dev);
>
> pci_reset_bus() returns an error, do you need to consult that before
> unconditionally setting PCI_ERS_RESULT_RECOVERED?
Good point. I will fix this in next version.
>
>> status = PCI_ERS_RESULT_RECOVERED;
>> pci_dbg(dev, "broadcast slot_reset message\n");
>> pci_walk_bus(bus, report_slot_reset, &status);
>> --
>> 2.17.1
>>
--
Sathyanarayanan Kuppuswamy
Linux Kernel Developer
next prev parent reply other threads:[~2020-10-12 21:47 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
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 [this message]
2020-10-14 8:00 ` Ethan Zhao
2020-10-14 8:19 ` Kuppuswamy, Sathyanarayanan
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=9b7db59d-832c-1c21-90b6-1676ea9058ce@linux.intel.com \
--to=sathyanarayanan.kuppuswamy@linux.intel.com \
--cc=ashok.raj@intel.com \
--cc=bhelgaas@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=okaya@kernel.org \
--cc=sathyanarayanan.nkuppuswamy@gmail.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).