Commit 81523bf2 authored by Jeff Garzik's avatar Jeff Garzik Committed by Linus Torvalds

[PATCH] fix via irq routing

Via irq routing has a funky PIRQD location.  I checked my datasheets
and, yep, this is correct all the way back to via686a.
This bug existed for _ages_.  I wonder if I created it, even...
parent e631aa44
......@@ -195,15 +195,16 @@ static int pirq_piix_set(struct pci_dev *router, struct pci_dev *dev, int pirq,
/*
* The VIA pirq rules are nibble-based, like ALI,
* but without the ugly irq number munging.
* However, PIRQD is in the upper instead of lower 4 bits.
*/
static int pirq_via_get(struct pci_dev *router, struct pci_dev *dev, int pirq)
{
return read_config_nybble(router, 0x55, pirq);
return read_config_nybble(router, 0x55, pirq == 4 ? 5 : pirq);
}
static int pirq_via_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq)
{
write_config_nybble(router, 0x55, pirq, irq);
write_config_nybble(router, 0x55, pirq == 4 ? 5 : pirq, irq);
return 1;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment