--- trunk/reactos/drivers/bus/pci/fdo.c 2005-11-23 20:37:38 UTC (rev 19499)
+++ trunk/reactos/drivers/bus/pci/fdo.c 2005-11-23 20:47:38 UTC (rev 19500)
@@ -7,9 +7,6 @@
* 10-09-2001 CSH Created
*/
-#include <ddk/ntddk.h>
-
-#include "pcidef.h"
#include "pci.h"
#define NDEBUG
--- trunk/reactos/drivers/bus/pci/pci.c 2005-11-23 20:37:38 UTC (rev 19499)
+++ trunk/reactos/drivers/bus/pci/pci.c 2005-11-23 20:47:38 UTC (rev 19500)
@@ -7,11 +7,7 @@
* 10-09-2001 CSH Created
*/
-#include <ddk/ntddk.h>
-#include <ddk/ntifs.h>
-#include <stdio.h>
-
-#include "pcidef.h"
+#define INITGUID
#include "pci.h"
#define NDEBUG
--- trunk/reactos/drivers/bus/pci/pci.h 2005-11-23 20:37:38 UTC (rev 19499)
+++ trunk/reactos/drivers/bus/pci/pci.h 2005-11-23 20:47:38 UTC (rev 19500)
@@ -1,6 +1,9 @@
#ifndef __PCI_H
#define __PCI_H
+#include <ddk/ntifs.h>
+#include <ddk/wdmguid.h>
+#include <stdio.h>
typedef struct _PCI_DEVICE
{
--- trunk/reactos/drivers/bus/pci/pdo.c 2005-11-23 20:37:38 UTC (rev 19499)
+++ trunk/reactos/drivers/bus/pci/pdo.c 2005-11-23 20:47:38 UTC (rev 19500)
@@ -7,11 +7,6 @@
* 10-09-2001 CSH Created
*/
-#include <ddk/ntddk.h>
-#include <ddk/ntifs.h>
-#include <initguid.h>
-#include <ddk/wdmguid.h>
-#include "pcidef.h"
#include "pci.h"
#define NDEBUG
@@ -1020,9 +1015,9 @@
{
return FALSE;
}
- if ((Parameters->Flags && PCI_USE_CLASS_SUBCLASS) && (
- PciConfig->u.type0.SubVendorID != Parameters->SubVendorID ||
- PciConfig->u.type0.SubSystemID != Parameters->SubSystemID))
+ if ((Parameters->Flags & PCI_USE_CLASS_SUBCLASS) && (
+ PciConfig->BaseClass != Parameters->BaseClass ||
+ PciConfig->SubClass != Parameters->SubClass))
{
return FALSE;
}
@@ -1032,8 +1027,8 @@
return FALSE;
}
if ((Parameters->Flags & PCI_USE_SUBSYSTEM_IDS) && (
- PciConfig->Command != Parameters->SubVendorID ||
- PciConfig->Status != Parameters->SubSystemID))
+ PciConfig->u.type0.SubVendorID != Parameters->SubVendorID ||
+ PciConfig->u.type0.SubSystemID != Parameters->SubSystemID))
{
return FALSE;
}
@@ -1127,9 +1122,6 @@
BusInterface = (PBUS_INTERFACE_STANDARD)IrpSp->Parameters.QueryInterface.Interface;
BusInterface->Size = sizeof(BUS_INTERFACE_STANDARD);
BusInterface->Version = 1;
- BusInterface->Context = DeviceObject;
- BusInterface->InterfaceReference = InterfaceReference;
- BusInterface->InterfaceDereference = InterfaceDereference;
BusInterface->TranslateBusAddress = InterfaceBusTranslateBusAddress;
BusInterface->GetDmaAdapter = InterfaceBusGetDmaAdapter;
BusInterface->SetBusData = InterfaceBusSetBusData;
@@ -1151,9 +1143,6 @@
PciDevicePresentInterface = (PPCI_DEVICE_PRESENT_INTERFACE)IrpSp->Parameters.QueryInterface.Interface;
PciDevicePresentInterface->Size = sizeof(PCI_DEVICE_PRESENT_INTERFACE);
PciDevicePresentInterface->Version = 1;
- PciDevicePresentInterface->Context = DeviceObject;
- PciDevicePresentInterface->InterfaceReference = InterfaceReference;
- PciDevicePresentInterface->InterfaceDereference = InterfaceDereference;
PciDevicePresentInterface->IsDevicePresent = InterfacePciDevicePresent;
PciDevicePresentInterface->IsDevicePresentEx = InterfacePciDevicePresentEx;
Status = STATUS_SUCCESS;
@@ -1170,6 +1159,9 @@
/* Add a reference for the returned interface */
PINTERFACE Interface;
Interface = (PINTERFACE)IrpSp->Parameters.QueryInterface.Interface;
+ Interface->Context = DeviceObject;
+ Interface->InterfaceReference = InterfaceReference;
+ Interface->InterfaceDereference = InterfaceDereference;
Interface->InterfaceReference(Interface->Context);
}