Ok. So that is why the inconsistency persists...
Yes. It also allows for bigger machines. And I can get a consistent
number out of MSI if we allocate irq numbers in a sufficiently non-sparse
way. Something like bus|device|func|irq which is 8+5+3+12 or 28 bits...
I'll never get there though if i keep unearthing this long standing bugs.
What I have been doing lately is to aim at consistency in how a function
is called (and thus how it is expected to be used) and how it is actually
implemented. When I have a choice I try to pick a forgiving implementation
so that driver writers don't have to follow a magic correct path for
things to work correctly.
Removing the irq assignment from pci_enable_device is something that
matches implementation with use.
As for the rest it seems reasonable to me to allow an irq to be held
requested over suspend/resume and to save and restore apic and msi
capability state. Especially since irq numbers are a kernel
abstraction we should be able to do with them what we need to.
Honestly the whole suspend/resume thing is beyond me at this point I'm
laptop free... But I do know how to make code consistent with itself.
Eric
-