From: Brett Creeley <bcreeley@amd.com>
To: Lukas Wunner <lukas@wunner.de>, Shannon Nelson <shannon.nelson@amd.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org,
edumazet@google.com, pabeni@redhat.com, brett.creeley@amd.com,
drivers@pensando.io
Subject: Re: [PATCH net-next 1/3] pds_core: add simple AER handler
Date: Tue, 5 Aug 2025 15:10:19 -0700 [thread overview]
Message-ID: <48ffde5c-084f-4ad6-8be7-314afb14b2ac@amd.com> (raw)
In-Reply-To: <aJIcyjyGxlKm382t@wunner.de>
On 8/5/2025 8:01 AM, Lukas Wunner wrote:
> Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
>
>
> On Fri, Feb 16, 2024 at 02:29:50PM -0800, Shannon Nelson wrote:
>> Set up the pci_error_handlers error_detected and resume to be
>> useful in handling AER events.
>
> The above was committed as d740f4be7cf0 ("pds_core: add simple
> AER handler").
>
> Just noticed the following while inspecting the pci_error_handlers
> of this driver:
>
>> +static pci_ers_result_t pdsc_pci_error_detected(struct pci_dev *pdev,
>> + pci_channel_state_t error)
>> +{
>> + if (error == pci_channel_io_frozen) {
>> + pdsc_reset_prepare(pdev);
>> + return PCI_ERS_RESULT_NEED_RESET;
>> + }
>> +
>> + return PCI_ERS_RESULT_NONE;
>> +}
>
> The ->error_detected() callback of this driver invokes
> pdsc_reset_prepare(), which unmaps BARs and calls pci_disable_device(),
> but there is no corresponding ->slot_reset() callback which would invoke
> pdsc_reset_done() to re-enable the device after reset recovery.
>
> I don't have this hardware available for testing, hence do not feel
> comfortable submitting a fix. But this definitely looks broken.
Hi Lukas,
Thanks for the note. It's been a bit since I have looked at this, but I
believe that it's working in the following way:
1. pds_core's pci_error_handlers.error_detected callback returns
PCI_ERS_RESULT_NEED_RESET
2. status is initialized to PCI_ERS_RESULT_RECOVERED in the pci core and
since pds_core doesn't have a slot_reset callback then status remains
PCI_ERS_RESULT_RECOVERED
3. pds_core's pci_error_handlers.resume callback is called, which will
attempt reset/recover the device to a functional state
I also know that, at the very least, Shannon tested this when adding it
to the driver.
Let me know if you still think otherwise.
Thanks again for the feedback,
Brett
next prev parent reply other threads:[~2025-08-05 22:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-16 22:29 [PATCH net-next 0/3] pds_core: AER handling Shannon Nelson
2024-02-16 22:29 ` [PATCH net-next 1/3] pds_core: add simple AER handler Shannon Nelson
2025-08-05 15:01 ` Lukas Wunner
2025-08-05 22:10 ` Brett Creeley [this message]
2025-08-05 22:28 ` Shannon Nelson
2025-08-06 6:58 ` Lukas Wunner
2025-08-06 7:08 ` Lukas Wunner
2024-02-16 22:29 ` [PATCH net-next 2/3] pds_core: delete VF dev on reset Shannon Nelson
2024-02-16 22:29 ` [PATCH net-next 3/3] pds_core: use pci_reset_function for health reset Shannon Nelson
2024-02-19 10:40 ` [PATCH net-next 0/3] pds_core: AER handling patchwork-bot+netdevbpf
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=48ffde5c-084f-4ad6-8be7-314afb14b2ac@amd.com \
--to=bcreeley@amd.com \
--cc=brett.creeley@amd.com \
--cc=davem@davemloft.net \
--cc=drivers@pensando.io \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=lukas@wunner.de \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shannon.nelson@amd.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