I bet that we can fix this up easily.
I bet the "translation" is just something like
reg = pirq;
if (reg < 5)
reg += 0x40;
and that what happened was that SiS _originally_ only specified INTA-INTD,
and specified them as pirq link values 0x01-0x04, mapping to config
registers 0x41-0x44.
Later on they noticed that they wanted to do the other things too, and
they expanded the definition to be "for any other value, it's the config
space address".
> BTW: I was wondering, why we did not update the PCI_INTERRUPT_LINE in
> config space when we re-route dev->irq. Well, documentation/pci.txt says
> we should trust on dev->irq over config space, however stopping lspci
> and friends to confuse us would be too bad either. So I've included a
> one-liner to fix this.
I would prefer _not_ to see this.
Why? Because it's (a) real information what the PCI config space was, and
it might help debug things in the future. And (b) I've seen to many broken
BIOSes that do not re-initialize hardware fully over a soft boot, that I
worry that you'll get different behaviour after doing a "shutdown -r" with
this.
I'd rather not touch config space more than necessary.
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/