[ros-diffs] [fireball] 47169: [HALX86] - Revert changes to HalpGetPCIData made in r47162. There is no need to introduce ReactOS-specific behavior of this function. It's much better to aim real NT compatibility, and develop your drivers against NT first and only then hack ReactOS. - Changes to buses scanning are left as they are.

fireball at svn.reactos.org fireball at svn.reactos.org
Wed May 12 11:45:43 CEST 2010


Author: fireball
Date: Wed May 12 11:45:43 2010
New Revision: 47169

URL: http://svn.reactos.org/svn/reactos?rev=47169&view=rev
Log:
[HALX86]
- Revert changes to HalpGetPCIData made in r47162. There is no need to introduce ReactOS-specific behavior of this function. It's much better to aim real NT compatibility, and develop your drivers against NT first and only then hack ReactOS.
- Changes to buses scanning are left as they are.

Modified:
    trunk/reactos/hal/halx86/generic/bus/pcibus.c

Modified: trunk/reactos/hal/halx86/generic/bus/pcibus.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/bus/pcibus.c?rev=47169&r1=47168&r2=47169&view=diff
==============================================================================
--- trunk/reactos/hal/halx86/generic/bus/pcibus.c [iso-8859-1] (original)
+++ trunk/reactos/hal/halx86/generic/bus/pcibus.c [iso-8859-1] Wed May 12 11:45:43 2010
@@ -369,10 +369,6 @@
     }
 #endif
 
-    /* Make sure the bus number is in our range of good bus numbers */
-    if (BusHandler->BusNumber > HalpMaxPciBus || BusHandler->BusNumber < HalpMinPciBus)
-        return 0;
-
     /* Normalize the length */
     if (Length > sizeof(PCI_COMMON_CONFIG)) Length = sizeof(PCI_COMMON_CONFIG);
 
@@ -394,15 +390,9 @@
         /* Validate the vendor ID */
         if (PciConfig->VendorID == PCI_INVALID_VENDORID)
         {
-            /* It's invalid, but we can copy PCI_INVALID_VENDORID */
-            if (Offset == 0 && Length >= sizeof(USHORT))
-            {
-                *(PUSHORT)Buffer = PCI_INVALID_VENDORID;
-                return sizeof(USHORT);
-            }
-
-            /* We can't copy PCI_INVALID_VENDORID so just return 0 */
-            return 0;
+            /* It's invalid, but we want to return this much */
+            PciConfig->VendorID = PCI_INVALID_VENDORID;
+            Len = sizeof(USHORT);
         }
 
         /* Now check if there's space left */
@@ -464,10 +454,6 @@
         return 0;
     }
 #endif
-
-    /* Make sure this bus number is in our range of good bus numbers */
-    if (BusHandler->BusNumber > HalpMaxPciBus || BusHandler->BusNumber < HalpMinPciBus)
-        return 0;
 
     /* Normalize the length */
     if (Length > sizeof(PCI_COMMON_CONFIG)) Length = sizeof(PCI_COMMON_CONFIG);




More information about the Ros-diffs mailing list