From f2eb6a01610716b39e68e9f5e5d7e1796c487feb Mon Sep 17 00:00:00 2001 From: OBattler Date: Mon, 23 Sep 2024 05:54:46 +0200 Subject: [PATCH] UM8886: More IRQ-related bug fixes, including incorrect shifts to the right by 8 instead of 4 bits which was causing all PCI devices to use IRQ 0 instead of their assigned IRQ. --- src/chipset/umc_8886.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/chipset/umc_8886.c b/src/chipset/umc_8886.c index 2b867c000..3ec6885b6 100644 --- a/src/chipset/umc_8886.c +++ b/src/chipset/umc_8886.c @@ -170,20 +170,20 @@ umc_8886_irq_recalc(umc_8886_t *dev) int irq_routing; uint8_t *conf = dev->pci_conf_sb[0]; - irq_routing = (conf[0x46] & 0x01) ? (conf[0x43] >> 8) : PCI_IRQ_DISABLED; + irq_routing = (conf[0x46] & 0x01) ? (conf[0x43] >> 4) : PCI_IRQ_DISABLED; pci_set_irq_routing(PCI_INTA, irq_routing); irq_routing = (conf[0x46] & 0x02) ? (conf[0x43] & 0x0f) : PCI_IRQ_DISABLED; pci_set_irq_routing(PCI_INTB, irq_routing); - irq_routing = (conf[0x46] & 0x04) ? (conf[0x44] >> 8) : PCI_IRQ_DISABLED; + irq_routing = (conf[0x46] & 0x04) ? (conf[0x44] >> 4) : PCI_IRQ_DISABLED; pci_set_irq_routing(PCI_INTC, irq_routing); irq_routing = (conf[0x46] & 0x08) ? (conf[0x44] & 0x0f) : PCI_IRQ_DISABLED; pci_set_irq_routing(PCI_INTD, irq_routing); - pci_set_irq_level(PCI_INTA, !(conf[0x47] & 0x01)); - pci_set_irq_level(PCI_INTB, !(conf[0x47] & 0x02)); - pci_set_irq_level(PCI_INTC, !(conf[0x47] & 0x04)); - pci_set_irq_level(PCI_INTD, !(conf[0x47] & 0x08)); + pci_set_irq_level(PCI_INTA, (conf[0x47] & 0x01)); + pci_set_irq_level(PCI_INTB, (conf[0x47] & 0x02)); + pci_set_irq_level(PCI_INTC, (conf[0x47] & 0x04)); + pci_set_irq_level(PCI_INTD, (conf[0x47] & 0x08)); } static void