mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 01:05:42 +00:00
[NTOSKRNL]
- Fix linking of device children to respect the enumeration order instead of linking in reverse enumeration order - PCI cards (and other devices) now enumerate in the correct order svn path=/trunk/; revision=55912
This commit is contained in:
parent
4ba7e8a742
commit
bf426aafef
1 changed files with 9 additions and 2 deletions
|
@ -1128,10 +1128,17 @@ IopCreateDeviceNode(PDEVICE_NODE ParentNode,
|
||||||
{
|
{
|
||||||
KeAcquireSpinLock(&IopDeviceTreeLock, &OldIrql);
|
KeAcquireSpinLock(&IopDeviceTreeLock, &OldIrql);
|
||||||
Node->Parent = ParentNode;
|
Node->Parent = ParentNode;
|
||||||
Node->Sibling = ParentNode->Child;
|
Node->Sibling = NULL;
|
||||||
ParentNode->Child = Node;
|
|
||||||
if (ParentNode->LastChild == NULL)
|
if (ParentNode->LastChild == NULL)
|
||||||
|
{
|
||||||
|
ParentNode->Child = Node;
|
||||||
ParentNode->LastChild = Node;
|
ParentNode->LastChild = Node;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ParentNode->LastChild->Sibling = Node;
|
||||||
|
ParentNode->LastChild = Node;
|
||||||
|
}
|
||||||
KeReleaseSpinLock(&IopDeviceTreeLock, OldIrql);
|
KeReleaseSpinLock(&IopDeviceTreeLock, OldIrql);
|
||||||
Node->Level = ParentNode->Level + 1;
|
Node->Level = ParentNode->Level + 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue