Check if PCI interrupts are disabled on the EHCI device. Rather unlikely to be

the case, but maybe there's some BIOSes that disable them? More or less poking
around for #5551, doesn't do any harm in any case.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41514 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz 2011-05-15 15:03:38 +00:00
parent c46509339b
commit 609f2f3393
1 changed files with 10 additions and 0 deletions

View File

@ -326,6 +326,16 @@ EHCI::EHCI(pci_info *info, Stack *stack)
| EHCI_USBINTR_USBINT | EHCI_USBINTR_INTONAA;
WriteOpReg(EHCI_USBINTR, fEnabledInterrupts);
// ensure that interrupts are enabled on the PCI device as well
command = sPCIModule->read_pci_config(fPCIInfo->bus, fPCIInfo->device,
fPCIInfo->function, PCI_command, 2);
if ((command & PCI_command_int_disable) != 0) {
TRACE_ALWAYS("PCI interrupts were disabled, enabling\n");
command &= ~PCI_command_int_disable;
sPCIModule->write_pci_config(fPCIInfo->bus, fPCIInfo->device,
fPCIInfo->function, PCI_command, 2, command);
}
// structures don't span page boundaries
size_t itdListSize = EHCI_VFRAMELIST_ENTRIES_COUNT
/ (B_PAGE_SIZE / sizeof(itd_entry)) * B_PAGE_SIZE;