Ticket #8588: revert-hrev41513.patch

File revert-hrev41513.patch, 2.1 KB (added by drcouzelis, 12 years ago)
  • src/add-ons/kernel/busses/usb/ohci.cpp

    From bd3bc20b5b48042f9907f4ee74f7afa8b7411e30 Mon Sep 17 00:00:00 2001
    From: David Couzelis <drcouzelis@gmail.com>
    Date: Thu, 14 Jun 2012 22:08:14 -0400
    Subject: [PATCH] Revert the changes from hrev41513. Rearranging the order of
     OHCI interrupts caused the sound card initialization
     failure, problems when shuttind down, and sporadic boot
     failures.
    
    ---
     src/add-ons/kernel/busses/usb/ohci.cpp |    7 ++++---
     1 files changed, 4 insertions(+), 3 deletions(-)
    
    diff --git a/src/add-ons/kernel/busses/usb/ohci.cpp b/src/add-ons/kernel/busses/usb/ohci.cpp
    index c9f2c1a..dc8fc8e 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)  
    238235    uint32 frameInterval = _ReadReg(OHCI_FRAME_INTERVAL);
    239236    uint32 intervalValue = OHCI_GET_INTERVAL_VALUE(frameInterval);
    240237
     238    // Disable interrupts right before we reset
    241239    _WriteReg(OHCI_COMMAND_STATUS, OHCI_HOST_CONTROLLER_RESET);
    242240    // Nominal time for a reset is 10 us
    243241    uint32 reset = 0;
    OHCI::OHCI(pci_info *info, Stack *stack)  
    254252    }
    255253
    256254    // The controller is now in SUSPEND state, we have 2ms to go OPERATIONAL.
     255    // Interrupts are disabled.
    257256
    258257    // Set up host controller register
    259258    _WriteReg(OHCI_HCCA, (uint32)hccaPhysicalAddress);
    260259    _WriteReg(OHCI_CONTROL_HEAD_ED, (uint32)fDummyControl->physical_address);
    261260    _WriteReg(OHCI_BULK_HEAD_ED, (uint32)fDummyBulk->physical_address);
     261    // Disable all interrupts before handoff/reset
     262    _WriteReg(OHCI_INTERRUPT_DISABLE, OHCI_ALL_INTERRUPTS);
    262263    // Switch on desired functional features
    263264    control = _ReadReg(OHCI_CONTROL);
    264265    control &= ~(OHCI_CONTROL_BULK_SERVICE_RATIO_MASK | OHCI_ENABLE_LIST