On 1/19/22 22:18, Keith Busch wrote:
On Wed, Jan 19, 2022 at 03:00:02PM -0600, Bjorn Helgaas wrote:
On Wed, Jan 19, 2022 at 10:25:50AM -0800, Keith Busch wrote:
On Wed, Jan 19, 2022 at 10:22:00AM +0100, Stefan Roese wrote:
@@ -387,6 +387,10 @@ void pci_aer_init(struct pci_dev *dev)
pci_add_ext_cap_save_buffer(dev, PCI_EXT_CAP_ID_ERR, sizeof(u32) * n);
pci_aer_clear_status(dev);
+
+ /* Enable AER if requested */
+ if (pci_aer_available())
+ pci_enable_pcie_error_reporting(dev);
}
Hasn't it always been the device specific driver's responsibility to
call this function?
So far it has been done by the driver, because the PCI core doesn't do
it. But is there a reason it should be done by the driver? It
doesn't seem necessarily device-specific.
I was thinking the device driver knows if it provides .err_handler
callbacks in order to respond to AER handling, so it would know if it is
ready for its device to enable error reporting. But I guess it doesn't
really matter if the driver provides callbacks anyway.
That's my understanding as well.
Thanks,
Stefan