Ticket #8085: ohciFix.diff

File ohciFix.diff, 1001 bytes (added by kallisti5, 8 years ago)

Haiku version of ReactOS hrev55170

  • src/add-ons/kernel/busses/usb/ohci.cpp

    diff --git a/src/add-ons/kernel/busses/usb/ohci.cpp b/src/add-ons/kernel/busses/usb/ohci.cpp
    index c9f2c1a..5a9bbcf 100644
    a b OHCI::OHCI(pci_info *info, Stack *stack)  
    204204    fInterruptEndpoints[0]->next_physical_endpoint
    205205        = fDummyIsochronous->physical_address;
    206206
    207     // Disable all interrupts before handoff/reset
    208     _WriteReg(OHCI_INTERRUPT_DISABLE, OHCI_ALL_INTERRUPTS);
    209 
    210207    // Determine in what context we are running (Kindly copied from FreeBSD)
    211208    uint32 control = _ReadReg(OHCI_CONTROL);
    212209    if (control & OHCI_INTERRUPT_ROUTING) {
    OHCI::OHCI(pci_info *info, Stack *stack)  
    229226        snooze(USB_DELAY_BUS_RESET);
    230227    }
    231228
     229    // Disable all interrupts
     230    _WriteReg(OHCI_INTERRUPT_DISABLE, OHCI_ALL_INTERRUPTS);
     231
    232232    // This reset should not be necessary according to the OHCI spec, but
    233233    // without it some controllers do not start.
    234234    _WriteReg(OHCI_CONTROL, OHCI_HC_FUNCTIONAL_STATE_RESET);