mirror of
https://github.com/reactos/reactos.git
synced 2024-11-20 06:15:26 +00:00
[USBEHCI]
- Initialize the new queue head before inserting it into the asynchronous schedule list, and add a memory barrier to ensure this order. The list can be read by the host controller at any time, so the new item must be valid when inserted. See EHCI spec section 4.8.1. svn path=/trunk/; revision=63686
This commit is contained in:
parent
3166e6a066
commit
a2e82498a2
1 changed files with 10 additions and 8 deletions
|
@ -478,14 +478,6 @@ CUSBQueue::LinkQueueHead(
|
|||
//ASSERT(IsListEmpty(&HeadQueueHead->LinkedQueueHeads));
|
||||
InsertTailList(&HeadQueueHead->LinkedQueueHeads, &NewQueueHead->LinkedQueueHeads);
|
||||
|
||||
//
|
||||
// Update HLP for Previous QueueHead, which should be the last in list.
|
||||
//
|
||||
Entry = NewQueueHead->LinkedQueueHeads.Blink;
|
||||
LastQueueHead = CONTAINING_RECORD(Entry, QUEUE_HEAD, LinkedQueueHeads);
|
||||
//ASSERT(LastQueueHead == HeadQueueHead);
|
||||
LastQueueHead->HorizontalLinkPointer = (NewQueueHead->PhysicalAddr | QH_TYPE_QH);
|
||||
|
||||
//
|
||||
// Update HLP for NewQueueHead to point to next, which should be the HeadQueueHead
|
||||
//
|
||||
|
@ -494,6 +486,16 @@ CUSBQueue::LinkQueueHead(
|
|||
//ASSERT(NextQueueHead == HeadQueueHead);
|
||||
NewQueueHead->HorizontalLinkPointer = (NextQueueHead->PhysicalAddr | QH_TYPE_QH);
|
||||
|
||||
_ReadWriteBarrier();
|
||||
|
||||
//
|
||||
// Update HLP for Previous QueueHead, which should be the last in list.
|
||||
//
|
||||
Entry = NewQueueHead->LinkedQueueHeads.Blink;
|
||||
LastQueueHead = CONTAINING_RECORD(Entry, QUEUE_HEAD, LinkedQueueHeads);
|
||||
//ASSERT(LastQueueHead == HeadQueueHead);
|
||||
LastQueueHead->HorizontalLinkPointer = (NewQueueHead->PhysicalAddr | QH_TYPE_QH);
|
||||
|
||||
//
|
||||
// head queue head must be halted
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue