On Tue, 26 Aug 2025 20:35:33 -0500 Terry Bowman <terry.bowman@xxxxxxx> wrote: > The AER driver is now designed to forward CXL protocol errors to the CXL > driver. Update the CXL driver with functionality to dequeue the forwarded > CXL error from the kfifo. Also, update the CXL driver to begin the protocol > error handling processing using the work received from the FIFO. > > Update function cxl_proto_err_work_fn() to dequeue work forwarded by the > AER service driver. This will begin the CXL protocol error processing with > a call to cxl_handle_proto_error(). > > Introduce logic to take the SBDF values from 'struct cxl_proto_error_info' > and use in discovering the erring PCI device. The call to pci_get_domain_bus_and_slot() > will return a reference counted 'struct pci_dev *'. This will serve as > reference count to prevent releasing the CXL Endpoint's mapped RAS while > handling the error. Use scope base __free() to put the reference count. > This will change when adding support for CXL port devices in the future. > > Implement cxl_handle_proto_error() to differentiate between Restricted CXL > Host (RCH) protocol errors and CXL virtual host (VH) protocol errors. > Maintain the existing RCH handling. Export the AER driver's pcie_walk_rcec() > allowing the CXL driver to walk the RCEC's secondary bus. > > VH correctable error (CE) processing will call the CXL CE handler. VH > uncorrectable errors (UCE) will call cxl_do_recovery(), implemented as a > stub for now and to be updated in future patch. Export pci_aer_clean_fatal_status() > and pci_clean_device_status() used to clean up AER status after handling. > > Signed-off-by: Terry Bowman <terry.bowman@xxxxxxx> > Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@xxxxxxxxxxxxxxx> One additional comment. > diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c > index d775ed37a79b..2c9827690cb3 100644 > --- a/drivers/pci/pci.c > +++ b/drivers/pci/pci.c > @@ -2328,6 +2328,7 @@ void pcie_clear_device_status(struct pci_dev *dev) > pcie_capability_read_word(dev, PCI_EXP_DEVSTA, &sta); > pcie_capability_write_word(dev, PCI_EXP_DEVSTA, sta); > } > +EXPORT_SYMBOL_NS_GPL(pcie_clear_device_status, "CXL"); Not seeing this as CXL specific. I don't think the namespace is appropriate. > #endif