Re: legacy PCI device behind a bridge not getting a valid IRQ on imx host controller

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

 



On Fri, Aug 30, 2024 at 9:14 AM Frank Li <Frank.li@xxxxxxx> wrote:
>
> On Fri, Aug 30, 2024 at 09:03:09AM -0700, Tim Harvey wrote:
> > On Thu, Aug 29, 2024 at 6:50 PM Hongxing Zhu <hongxing.zhu@xxxxxxx> wrote:
> > >
> > > > -----Original Message-----
> > > > From: Bjorn Helgaas <helgaas@xxxxxxxxxx>
> > > > Sent: 2024年8月30日 5:23
> > > > To: tharvey@xxxxxxxxxxxxx; Hongxing Zhu <hongxing.zhu@xxxxxxx>; Lucas
> > > > Stach <l.stach@xxxxxxxxxxxxxx>
> > > > Cc: linux-pci@xxxxxxxxxxxxxxx
> > > > Subject: Re: legacy PCI device behind a bridge not getting a valid IRQ on imx
> > > > host controller
> > > >
> > > > [+cc Richard, Lucas, maintainers of IMX6 PCI]
> > > >
> > > > On Wed, Aug 28, 2024 at 02:40:33PM -0700, Tim Harvey wrote:
> > > > > Greetings,
> > > > >
> > > > > I have a user that is using an IMX8MM SoC (dwc controller) with a
> > > > > miniPCIe card that has a PEX8112 PCI-to-PCIe bridge to a legacy PCI
> > > > > device and the device is not getting a valid interrupt.
> > > >
> > > > Does pci-imx6.c support INTx at all?
> > > >
> > > i.MX PCIe RC supports INTx.
> > > Add pci=nomsi into kernel command line, can verify it when one endpoint
> > >  device is connected.
> > > Based i.MX8MM EVK board and on NVME, MSI or INTx are enabled.
> > > logs of MSI:
> > > root@imx8_all:~# lspci
> > > 00:00.0 PCI bridge: Synopsys, Inc. Device abcd (rev 01)
> > > 01:00.0 Non-Volatile memory controller: Device 1e49:0021 (rev 01)
> > > root@imx8_all:~# cat /proc/interrupts | grep MSI
> > > 221:          0          0          0          0   PCI-MSI   0 Edge      PCIe PME
> > > 222:         14          0          0          0   PCI-MSI 524288 Edge      nvme0q0
> > > 223:        382          0          0          0   PCI-MSI 524289 Edge      nvme0q1
> > > 224:        115          0          0          0   PCI-MSI 524290 Edge      nvme0q2
> > > 225:        521          0          0          0   PCI-MSI 524291 Edge      nvme0q3
> > > 226:         53          0          0          0   PCI-MSI 524292 Edge      nvme0q4
> > >
> >
> > Richard,
> >
> > off topic but I've seen in the IMX8MMRM a claim that it supports MSI-X
> > but I have not seen this to be the case as you are showing above with
> > an nvme that would clearly use MSI-X if available.
>
> IMX8MM should support MSI only.
>

Hi Frank,

Thanks for clarifying this; I don't know why the IMX8MMRM and IMX8MPRM
indicate they support MSI-X.

I have the hardware in hand now as well as the out-of-tree driver
that's being used. I can say there is nothing wrong here with legacy
PCI interrupt mapping, if I write a skeleton driver that uses
pci_resister_driver(struct pci_driver) its probe is called with an
interrupt and request_irq on that interrupt succeeds just fine.

The issue here is with the vendor's out-of-tree driver which instead
is using pci_get_device() to scan the bus which returns a struct
pci_dev * that doesn't have an irq assigned (like what is described in
https://www.kernel.org/doc/html/v5.5/PCI/pci.html#how-to-find-pci-devices-manually).
When using pci_get_device() when/how does pci_assign_irq() get called
to assign the irq to the device?

Best Regards,

Tim





[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