EHCI: Move locking to be only around actually critical section.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user