From: Smita Koralahalli <Smita.KoralahalliChannabasappa@amd.com>
To: Lukas Wunner <lukas@wunner.de>,
Ethan Zhao <haifeng.zhao@linux.intel.com>
Cc: bhelgaas@google.com, ilpo.jarvinen@linux.intel.com,
sathyanarayanan.kuppuswamy@linux.intel.com,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
kbusch@kernel.org
Subject: Re: [PATCH pci-next] pci/edr: Ignore Surprise Down error on hot removal
Date: Mon, 4 Mar 2024 11:33:52 -0800 [thread overview]
Message-ID: <ff3918bc-ebd2-60e2-971f-5b48ba929335@amd.com> (raw)
In-Reply-To: <20240304115844.GA3541@wunner.de>
Hi Ethan,
On 3/4/2024 3:58 AM, Lukas Wunner wrote:
> On Mon, Mar 04, 2024 at 04:08:19AM -0500, Ethan Zhao wrote:
>> Per PCI firmware spec r3.3 sec 4.6.12, for firmware first mode DPC
>> handling path, FW should clear UC errors logged by port and bring link
>> out of DPC, but because of ambiguity of wording in the spec, some BIOSes
>> doesn't clear the surprise down error and the error bits in pci status,
>> still notify OS to handle it. thus following trick is needed in EDR when
>> double reporting (hot removal interrupt && dpc notification) is hit.
Please correct me if I'm wrong.
When there is double reporting (hot removal interrupt && dpc
notification), won't the DPC handler be called always which takes care
of clearing the surprise down errors? Do we need it again from EDR handler?
Thanks
Smita
>
> Please provide more detailed information about the hardware and BIOS
> affected by this.
>
>
>> -static void dpc_handle_surprise_removal(struct pci_dev *pdev)
>> +bool dpc_handle_surprise_removal(struct pci_dev *pdev)
>> {
>> + if (!dpc_is_surprise_removal(pdev))
>> + return false;
>
> This change of moving dpc_is_surprise_removal() into
> dpc_handle_surprise_removal() seems unrelated to the problem at hand.
>
> Please drop it if it's unnecessary to fix the issue.
>
>
>> --- a/drivers/pci/pcie/edr.c
>> +++ b/drivers/pci/pcie/edr.c
>> @@ -184,6 +184,9 @@ static void edr_handle_event(acpi_handle handle, u32 event, void *data)
>> goto send_ost;
>> }
>>
>> + if (dpc_handle_surprise_removal(edev))
>> + goto send_ost;
>> +
>> dpc_process_error(edev);
>> pci_aer_raw_clear_status(edev);
>
> This seems to be the only necessary change. Please reduce the
> patch to contain only it and no other refactoring.
>
> Please capitalize the "PCI/EDR: " prefix in the subject and add
> a Fixes tag.
>
> Thanks,
>
> Lukas
>
next prev parent reply other threads:[~2024-03-04 19:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-04 9:08 [PATCH pci-next] pci/edr: Ignore Surprise Down error on hot removal Ethan Zhao
2024-03-04 11:58 ` Lukas Wunner
2024-03-04 19:33 ` Smita Koralahalli [this message]
2024-03-05 2:19 ` Ethan Zhao
2024-03-05 2:09 ` Ethan Zhao
2024-03-05 9:21 ` Lukas Wunner
2024-03-06 1:37 ` Ethan Zhao
2024-03-04 20:10 ` Kuppuswamy Sathyanarayanan
2024-03-05 2:29 ` Ethan Zhao
2024-03-05 4:04 ` Kuppuswamy Sathyanarayanan
2024-03-05 5:49 ` Ethan Zhao
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=ff3918bc-ebd2-60e2-971f-5b48ba929335@amd.com \
--to=smita.koralahallichannabasappa@amd.com \
--cc=bhelgaas@google.com \
--cc=haifeng.zhao@linux.intel.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=kbusch@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=sathyanarayanan.kuppuswamy@linux.intel.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