Re: [PATCH v18 10/11] PCI/DPC: Add Error Disconnect Recover (EDR) support

From: Kuppuswamy, Sathyanarayanan
Date: Tue Mar 24 2020 - 21:00:34 EST


Hi Bjorn,

On 3/24/20 2:37 PM, Bjorn Helgaas wrote:
This is really ugly. What's the story on this firmware? It sounds
defective to me.
I think there is no defined standard for this. I have checked few
_DSM implementations. Some of them return default value and some
don't. But atleast in the test hardware I use, we need this check.


Or is everybody that uses _DSM supposed to check before evaluating it?
I think its safer to do this check.
E.g.,

if (!acpi_check_dsm(...))
return -EINVAL;

obj = acpi_evaluate_dsm(...);

If everybody is supposed to do this, it seems like the check part
should be moved into acpi_evaluate_dsm().