Re: Does dwc/pci-layerscape.c support AER?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 02, 2025 at 05:38:41PM -0500, Bjorn Helgaas wrote:
> I see "aer" mentioned in layerscape DT 'interrupt-names':
>
>   $ git grep "interrupt-names.*aer" Documentation/devicetree/bindings/pci/ arch
>   Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml: interrupt-names = "aer";
>   arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi: interrupt-names = "pme", "aer";
>   arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi: interrupt-names = "pme", "aer";
>   arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi: interrupt-names = "pme", "aer";
>   ...
>
> But I don't know whether or how these are connected to the AER driver
> (drivers/pci/pcie/aer.c).
>
> Does the AER driver actually work on these platforms?
>
> Is there some magic that connects the 'interrupt-names'/'interrupts'
> DT properties to the pcie_device.irq that aer_probe() requests and
> hooks up with the aer_irq() handler?
>
> The pcie_device.irq for AER was assigned by portdrv in this path:
>
>   pcie_portdrv_probe
>     pcie_port_device_register(pci_dev *dev)
>       int irqs[PCIE_PORT_DEVICE_MAXSERVICES]
>       pcie_init_service_irqs(dev, irqs, ...)
>         # try MSI/MSI-X first:
>         pcie_port_enable_irq_vec(dev, irqs, ...)
>           pci_alloc_irq_vectors(PCI_IRQ_MSIX | PCI_IRQ_MSI)
>           pcie_message_numbers(dev, mask, &pme, &aer, &dpc)
>           irqs[PCIE_PORT_SERVICE_AER_SHIFT] = pci_irq_vector(dev, aer)
>         # fall back to INTx if no MSI/MSI-X
>         pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_INTX);
>       for (i = 0; ...; i++)
>         pcie_device_init(pdev, irqs[i])
>           pcie = kzalloc()            # struct pcie_device
>           pcie->irq = irq             # <-- pcie_device.irq
>
> but I only see attempts to use MSI/MSI-X/INTx, which we discover and
> configure based on the MSI or MSI-X Capability or the INTx pin
> advertised at PCI_INTERRUPT_PIN.
>
> I don't see anything related to DT or platform IRQs that I can connect
> with the DT 'interrupts' property.

There are several attempts to upstream customer Aer irq support in past years.

For example:
  https://www.mail-archive.com/linux-kernel@xxxxxxxxxxxxxxx/msg1161848.html

some change port drivers.

If you think it is valuable to support customer AER IRQ support, I can restart
this work.

Frank

>
> Bjorn




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux