nvme_disk: Unconditionally mask off PCI_command_int_disable.

Otherwise legacy interrupts do not work at all on x86.
This fixes hrev55299, which contrary to the commit message,
did not "add" legacy interrupts support; it was already there,
and in fact that commit broke it on x86.
This commit is contained in:
Augustin Cavalier
2021-10-18 16:32:32 -04:00
parent 628ddb2790
commit 8f5199f019
@@ -295,6 +295,10 @@ nvme_disk_init_device(void* _info, void** _cookie)
sPCIx86Module = NULL; sPCIx86Module = NULL;
} }
command = pci->read_pci_config(pcidev, PCI_command, 2);
command &= ~(PCI_command_int_disable);
pci->write_pci_config(pcidev, PCI_command, 2, command);
uint8 irq = info->info.u.h0.interrupt_line; uint8 irq = info->info.u.h0.interrupt_line;
if (sPCIx86Module != NULL) { if (sPCIx86Module != NULL) {
if (sPCIx86Module->get_msix_count(info->info.bus, info->info.device, if (sPCIx86Module->get_msix_count(info->info.bus, info->info.device,
@@ -318,10 +322,6 @@ nvme_disk_init_device(void* _info, void** _cookie)
irq = msiVector; irq = msiVector;
} }
} }
} else {
uint16 command = pci->read_pci_config(pcidev, PCI_command, 2);
command &= ~(PCI_command_int_disable);
pci->write_pci_config(pcidev, PCI_command, 2, command);
} }
if (irq == 0 || irq == 0xFF) { if (irq == 0 || irq == 0xFF) {