From eecc2a655eeeb687bfa5f15ea00cf17c87693df4 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 19 Jun 2011 01:42:05 +0000 Subject: [PATCH] [NTOSKRNL] - Change the resource type if HalTranslateBusAddress indicates that we got the address type wrong svn path=/trunk/; revision=52356 --- reactos/ntoskrnl/io/pnpmgr/pnpres.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/reactos/ntoskrnl/io/pnpmgr/pnpres.c b/reactos/ntoskrnl/io/pnpmgr/pnpres.c index ac1884e2d11..ee0fdca8b99 100644 --- a/reactos/ntoskrnl/io/pnpmgr/pnpres.c +++ b/reactos/ntoskrnl/io/pnpmgr/pnpres.c @@ -758,6 +758,13 @@ IopTranslateDeviceResources( DPRINT1("Failed to translate port resource (Start: 0x%I64x)\n", DescriptorRaw->u.Port.Start.QuadPart); goto cleanup; } + + if (AddressSpace == 0) + { + /* This is actually a memory resource */ + DescriptorRaw->Type = CmResourceTypeMemory; + DescriptorTranslated->Type = CmResourceTypeMemory; + } break; } case CmResourceTypeInterrupt: @@ -793,6 +800,13 @@ IopTranslateDeviceResources( DPRINT1("Failed to translate memory resource (Start: 0xI64x)\n", DescriptorRaw->u.Memory.Start.QuadPart); goto cleanup; } + + if (AddressSpace != 0) + { + /* This is actually an I/O port resource */ + DescriptorRaw->Type = CmResourceTypePort; + DescriptorTranslated->Type = CmResourceTypePort; + } } case CmResourceTypeDma: