Re: [PATCH] PCI/AER: Do not clear AER bits if we don't own AER

Alex G.
2018-07-19T15:55:11Z

On 07/17/2018 10:41 AM, Sinan Kaya wrote:
>
> On 7/17/2018 8:31 AM, Alexandru Gagniuc wrote:
>> +    if (pcie_aer_get_firmware_first(dev))
>> +        return -EIO;
>
> Can you move this to closer to the caller pci_aer_init()?

I could move it there. although pci_cleanup_aer_error_status_regs() is
called directly from pci_restore_state. Of course, aer_cap should be
zero in this case, and we'd still bail out.
I find the intent clearer if we check it here rather than having to do
the mental parsing of the state of aer_cap.

Alex