mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +00:00
[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. svn path=/trunk/; revision=47169
This commit is contained in:
parent
cdf0478255
commit
c6ddd201c7
1 changed files with 3 additions and 17 deletions
|
@ -369,10 +369,6 @@ HalpGetPCIData(IN PBUS_HANDLER BusHandler,
|
||||||
}
|
}
|
||||||
#endif
|
#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 */
|
/* Normalize the length */
|
||||||
if (Length > sizeof(PCI_COMMON_CONFIG)) Length = sizeof(PCI_COMMON_CONFIG);
|
if (Length > sizeof(PCI_COMMON_CONFIG)) Length = sizeof(PCI_COMMON_CONFIG);
|
||||||
|
|
||||||
|
@ -394,15 +390,9 @@ HalpGetPCIData(IN PBUS_HANDLER BusHandler,
|
||||||
/* Validate the vendor ID */
|
/* Validate the vendor ID */
|
||||||
if (PciConfig->VendorID == PCI_INVALID_VENDORID)
|
if (PciConfig->VendorID == PCI_INVALID_VENDORID)
|
||||||
{
|
{
|
||||||
/* It's invalid, but we can copy PCI_INVALID_VENDORID */
|
/* It's invalid, but we want to return this much */
|
||||||
if (Offset == 0 && Length >= sizeof(USHORT))
|
PciConfig->VendorID = PCI_INVALID_VENDORID;
|
||||||
{
|
Len = sizeof(USHORT);
|
||||||
*(PUSHORT)Buffer = PCI_INVALID_VENDORID;
|
|
||||||
return sizeof(USHORT);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* We can't copy PCI_INVALID_VENDORID so just return 0 */
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Now check if there's space left */
|
/* Now check if there's space left */
|
||||||
|
@ -465,10 +455,6 @@ HalpSetPCIData(IN PBUS_HANDLER BusHandler,
|
||||||
}
|
}
|
||||||
#endif
|
#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 */
|
/* Normalize the length */
|
||||||
if (Length > sizeof(PCI_COMMON_CONFIG)) Length = sizeof(PCI_COMMON_CONFIG);
|
if (Length > sizeof(PCI_COMMON_CONFIG)) Length = sizeof(PCI_COMMON_CONFIG);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue