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

From: Alex G.
Date: Thu Jul 19 2018 - 11:55:11 EST




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