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?



> This reminds me - how does a driver know if any kind of MSI support is
> even available?

it shouldn't need to.

unless it has specific need to avoid or prefer a particular type
of interrupt, the MD pci needs to deal with this.  eg, whatever
the pci_chipset_tag_t the driver attches with, should enable the
pci(9) backends to DTRT.

pci_intr_alloc(9) is already generic enough to enable all this
(in that it can be told to prefer anything, or to just work.)
ie, drivers that use pci_intr_alloc() without asking for any
particular type _should_ work with any controller.


i can't really comment on the actual question -- about whether
etablish can fail or not after alloc.  i think it would be good
if "alloc" implies that "establish" will work, but without
looking closely at all the cases (ie, drivers :), i can't be
sure it isn't really necessary.


.mrg.


Home | Main Index | Thread Index | Old Index