Re: [PATCH v10 7/8] PCI: Add support for ACPI _RST reset method

From: Shanker R Donthineni
Date: Mon Jul 12 2021 - 20:51:48 EST


Hi Alex,

On 7/12/21 6:09 PM, Alex Williamson wrote:
>> +/**
>> + * pci_dev_acpi_reset - do a function level reset using _RST method
>> + * @dev: device to reset
>> + * @probe: check if _RST method is included in the acpi_device context.
>> + */
>> +int pci_dev_acpi_reset(struct pci_dev *dev, int probe)
>> +{
>> + acpi_handle handle = ACPI_HANDLE(&dev->dev);
>> +
>> + if (!handle || !acpi_has_method(handle, "_RST"))
>> + return -ENOTTY;
>> +
>> + if (probe)
>> + return 0;
>> +
>> + if (ACPI_FAILURE(acpi_evaluate_object(handle, "_RST", NULL, NULL))) {
>> + pci_warn(dev, "ACPI _RST failed\n");
>> + return -EINVAL;
> Should we return -ENOTTY here instead to give a possible secondary
> reset method a chance? Thanks,
Thanks for reviewing patches.

ACPI/AML _RST method type is VOID. The only possibility of failure would be
either system is running out of memory or bugs in ACPICA. There is no strong
reason not to return -NOTTY.

I'll fix in the next version. Is there opportunity to include reset feature in v5.14-rc2?

Can I add your reviewed-by since no other comments to this patch?

-Shanker