EHCI: Move locking to be only around actually critical section.

This commit is contained in:
Michael Lotz
2014-08-31 12:08:17 +02:00
parent 63cf3cfa11
commit d7626f8db3
+3 -3
View File
@@ -2039,9 +2039,6 @@ EHCI::LinkQueueHead(ehci_qh *queueHead)
status_t
EHCI::LinkInterruptQueueHead(ehci_qh *queueHead, Pipe *pipe)
{
if (!Lock())
return B_ERROR;
uint8 interval = pipe->Interval();
if (pipe->Speed() == USB_SPEED_HIGHSPEED) {
// Allow interrupts to be scheduled on each possible micro frame.
@@ -2070,6 +2067,9 @@ EHCI::LinkInterruptQueueHead(ehci_qh *queueHead, Pipe *pipe)
if (interval > EHCI_INTERRUPT_ENTRIES_COUNT)
interval = EHCI_INTERRUPT_ENTRIES_COUNT;
if (!Lock())
return B_ERROR;
ehci_qh *interruptQueue = &fInterruptEntries[interval - 1].queue_head;
queueHead->next_phy = interruptQueue->next_phy;
queueHead->next_log = interruptQueue->next_log;