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)
|
204 | 204 | fInterruptEndpoints[0]->next_physical_endpoint |
205 | 205 | = fDummyIsochronous->physical_address; |
206 | 206 | |
207 | | // Disable all interrupts before handoff/reset |
208 | | _WriteReg(OHCI_INTERRUPT_DISABLE, OHCI_ALL_INTERRUPTS); |
209 | | |
210 | 207 | // Determine in what context we are running (Kindly copied from FreeBSD) |
211 | 208 | uint32 control = _ReadReg(OHCI_CONTROL); |
212 | 209 | if (control & OHCI_INTERRUPT_ROUTING) { |
… |
… |
OHCI::OHCI(pci_info *info, Stack *stack)
|
238 | 235 | uint32 frameInterval = _ReadReg(OHCI_FRAME_INTERVAL); |
239 | 236 | uint32 intervalValue = OHCI_GET_INTERVAL_VALUE(frameInterval); |
240 | 237 | |
| 238 | // Disable interrupts right before we reset |
241 | 239 | _WriteReg(OHCI_COMMAND_STATUS, OHCI_HOST_CONTROLLER_RESET); |
242 | 240 | // Nominal time for a reset is 10 us |
243 | 241 | uint32 reset = 0; |
… |
… |
OHCI::OHCI(pci_info *info, Stack *stack)
|
254 | 252 | } |
255 | 253 | |
256 | 254 | // The controller is now in SUSPEND state, we have 2ms to go OPERATIONAL. |
| 255 | // Interrupts are disabled. |
257 | 256 | |
258 | 257 | // Set up host controller register |
259 | 258 | _WriteReg(OHCI_HCCA, (uint32)hccaPhysicalAddress); |
260 | 259 | _WriteReg(OHCI_CONTROL_HEAD_ED, (uint32)fDummyControl->physical_address); |
261 | 260 | _WriteReg(OHCI_BULK_HEAD_ED, (uint32)fDummyBulk->physical_address); |
| 261 | // Disable all interrupts before handoff/reset |
| 262 | _WriteReg(OHCI_INTERRUPT_DISABLE, OHCI_ALL_INTERRUPTS); |
262 | 263 | // Switch on desired functional features |
263 | 264 | control = _ReadReg(OHCI_CONTROL); |
264 | 265 | control &= ~(OHCI_CONTROL_BULK_SERVICE_RATIO_MASK | OHCI_ENABLE_LIST |