From 609f2f339355713b8c70e0053cdcf40b2c0b4c5d Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Sun, 15 May 2011 15:03:38 +0000 Subject: [PATCH] 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 --- src/add-ons/kernel/busses/usb/ehci.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/add-ons/kernel/busses/usb/ehci.cpp b/src/add-ons/kernel/busses/usb/ehci.cpp index 544b2094f9..21345b910e 100644 --- a/src/add-ons/kernel/busses/usb/ehci.cpp +++ b/src/add-ons/kernel/busses/usb/ehci.cpp @@ -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;