mirror of
https://github.com/reactos/reactos.git
synced 2025-01-07 14:51:00 +00:00
Use a common header file
Small fix in CheckPciDevice svn path=/trunk/; revision=19500
This commit is contained in:
parent
9e0866bd57
commit
b57ef29796
4 changed files with 12 additions and 24 deletions
|
@ -7,9 +7,6 @@
|
||||||
* 10-09-2001 CSH Created
|
* 10-09-2001 CSH Created
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <ddk/ntddk.h>
|
|
||||||
|
|
||||||
#include "pcidef.h"
|
|
||||||
#include "pci.h"
|
#include "pci.h"
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
|
|
|
@ -7,11 +7,7 @@
|
||||||
* 10-09-2001 CSH Created
|
* 10-09-2001 CSH Created
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <ddk/ntddk.h>
|
#define INITGUID
|
||||||
#include <ddk/ntifs.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
#include "pcidef.h"
|
|
||||||
#include "pci.h"
|
#include "pci.h"
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
#ifndef __PCI_H
|
#ifndef __PCI_H
|
||||||
#define __PCI_H
|
#define __PCI_H
|
||||||
|
|
||||||
|
#include <ddk/ntifs.h>
|
||||||
|
#include <ddk/wdmguid.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
typedef struct _PCI_DEVICE
|
typedef struct _PCI_DEVICE
|
||||||
{
|
{
|
||||||
|
|
|
@ -7,11 +7,6 @@
|
||||||
* 10-09-2001 CSH Created
|
* 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"
|
#include "pci.h"
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
|
@ -1020,9 +1015,9 @@ CheckPciDevice(
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if ((Parameters->Flags && PCI_USE_CLASS_SUBCLASS) && (
|
if ((Parameters->Flags & PCI_USE_CLASS_SUBCLASS) && (
|
||||||
PciConfig->u.type0.SubVendorID != Parameters->SubVendorID ||
|
PciConfig->BaseClass != Parameters->BaseClass ||
|
||||||
PciConfig->u.type0.SubSystemID != Parameters->SubSystemID))
|
PciConfig->SubClass != Parameters->SubClass))
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -1032,8 +1027,8 @@ CheckPciDevice(
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if ((Parameters->Flags & PCI_USE_SUBSYSTEM_IDS) && (
|
if ((Parameters->Flags & PCI_USE_SUBSYSTEM_IDS) && (
|
||||||
PciConfig->Command != Parameters->SubVendorID ||
|
PciConfig->u.type0.SubVendorID != Parameters->SubVendorID ||
|
||||||
PciConfig->Status != Parameters->SubSystemID))
|
PciConfig->u.type0.SubSystemID != Parameters->SubSystemID))
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -1127,9 +1122,6 @@ PdoQueryInterface(
|
||||||
BusInterface = (PBUS_INTERFACE_STANDARD)IrpSp->Parameters.QueryInterface.Interface;
|
BusInterface = (PBUS_INTERFACE_STANDARD)IrpSp->Parameters.QueryInterface.Interface;
|
||||||
BusInterface->Size = sizeof(BUS_INTERFACE_STANDARD);
|
BusInterface->Size = sizeof(BUS_INTERFACE_STANDARD);
|
||||||
BusInterface->Version = 1;
|
BusInterface->Version = 1;
|
||||||
BusInterface->Context = DeviceObject;
|
|
||||||
BusInterface->InterfaceReference = InterfaceReference;
|
|
||||||
BusInterface->InterfaceDereference = InterfaceDereference;
|
|
||||||
BusInterface->TranslateBusAddress = InterfaceBusTranslateBusAddress;
|
BusInterface->TranslateBusAddress = InterfaceBusTranslateBusAddress;
|
||||||
BusInterface->GetDmaAdapter = InterfaceBusGetDmaAdapter;
|
BusInterface->GetDmaAdapter = InterfaceBusGetDmaAdapter;
|
||||||
BusInterface->SetBusData = InterfaceBusSetBusData;
|
BusInterface->SetBusData = InterfaceBusSetBusData;
|
||||||
|
@ -1151,9 +1143,6 @@ PdoQueryInterface(
|
||||||
PciDevicePresentInterface = (PPCI_DEVICE_PRESENT_INTERFACE)IrpSp->Parameters.QueryInterface.Interface;
|
PciDevicePresentInterface = (PPCI_DEVICE_PRESENT_INTERFACE)IrpSp->Parameters.QueryInterface.Interface;
|
||||||
PciDevicePresentInterface->Size = sizeof(PCI_DEVICE_PRESENT_INTERFACE);
|
PciDevicePresentInterface->Size = sizeof(PCI_DEVICE_PRESENT_INTERFACE);
|
||||||
PciDevicePresentInterface->Version = 1;
|
PciDevicePresentInterface->Version = 1;
|
||||||
PciDevicePresentInterface->Context = DeviceObject;
|
|
||||||
PciDevicePresentInterface->InterfaceReference = InterfaceReference;
|
|
||||||
PciDevicePresentInterface->InterfaceDereference = InterfaceDereference;
|
|
||||||
PciDevicePresentInterface->IsDevicePresent = InterfacePciDevicePresent;
|
PciDevicePresentInterface->IsDevicePresent = InterfacePciDevicePresent;
|
||||||
PciDevicePresentInterface->IsDevicePresentEx = InterfacePciDevicePresentEx;
|
PciDevicePresentInterface->IsDevicePresentEx = InterfacePciDevicePresentEx;
|
||||||
Status = STATUS_SUCCESS;
|
Status = STATUS_SUCCESS;
|
||||||
|
@ -1170,6 +1159,9 @@ PdoQueryInterface(
|
||||||
/* Add a reference for the returned interface */
|
/* Add a reference for the returned interface */
|
||||||
PINTERFACE Interface;
|
PINTERFACE Interface;
|
||||||
Interface = (PINTERFACE)IrpSp->Parameters.QueryInterface.Interface;
|
Interface = (PINTERFACE)IrpSp->Parameters.QueryInterface.Interface;
|
||||||
|
Interface->Context = DeviceObject;
|
||||||
|
Interface->InterfaceReference = InterfaceReference;
|
||||||
|
Interface->InterfaceDereference = InterfaceDereference;
|
||||||
Interface->InterfaceReference(Interface->Context);
|
Interface->InterfaceReference(Interface->Context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue