tech-kern archive

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

Re: pci_intr_alloc() vs pci_intr_establish() - retry type?



Hello,

On Tue, 27 Nov 2018 21:34:53 +0100
Jaromír Doleček <jaromir.dolecek%gmail.com@localhost> wrote:

> I see several drivers (e.g. xhci(4), ahcisata(4), bge(4), nvme(4))
> retry the pci_intr_alloc()+pci_intr_establish() with 'lower' types
> when pci_intr_establish() fails.
> 
> Is this a real case, can it actualy happen that pci_intr_alloc()
> returns the interrupt handlers, but pci_intr_establish() would fail
> for it?

This reminds me - how does a driver know if any kind of MSI support is
even available?
The reason I'm asking - on G5 macs we can support MSI and I'm planning
to add code for that eventually. ( Also on Iyonix, but that's got more
important problems for now. ) Wether support is available would
essentially depend on which host bridge the device in question is
connected to. PCI-X and PCIe slots in G5s could support MSI, the AGP
slot found in some G5s could not, and no G3 or G4 with whatever type of
PCI slots can support MSI.
On PCI-X G5s the situation is a bit weird - they have the same OpenPIC
as G4s, with IRQ lines wired to each slot, and on top of that another
OpenPIC which lives in the HT/PCI(-X|e) hostbridge, which can respond
to MSIs from anything living on a bus it controls. PCIe G5s have only
the latter.

have fun
Michael


Home | Main Index | Thread Index | Old Index