[ros-diffs] [cgutman] 52356: [NTOSKRNL] - Change the resource type if HalTranslateBusAddress indicates that we got the address type wrong

cgutman at svn.reactos.org cgutman at svn.reactos.org
Sun Jun 19 01:42:05 UTC 2011


Author: cgutman
Date: Sun Jun 19 01:42:05 2011
New Revision: 52356

URL: http://svn.reactos.org/svn/reactos?rev=52356&view=rev
Log:
[NTOSKRNL]
- Change the resource type if HalTranslateBusAddress indicates that we got the address type wrong

Modified:
    trunk/reactos/ntoskrnl/io/pnpmgr/pnpres.c

Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnpres.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr/pnpres.c?rev=52356&r1=52355&r2=52356&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/io/pnpmgr/pnpres.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/pnpmgr/pnpres.c [iso-8859-1] Sun Jun 19 01:42:05 2011
@@ -757,6 +757,13 @@
                   Status = STATUS_UNSUCCESSFUL;
                   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;
             }
@@ -793,6 +800,13 @@
                   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:




More information about the Ros-diffs mailing list