ReactOS  0.4.15-dev-976-g0f66c66
fdo.c File Reference
#include <isapnp.h>
#include <debug.h>
Include dependency graph for fdo.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

NTSTATUS NTAPI IsaFdoStartDevice (IN PISAPNP_FDO_EXTENSION FdoExt, IN PIRP Irp, IN PIO_STACK_LOCATION IrpSp)
 
NTSTATUS NTAPI IsaFdoQueryDeviceRelations (IN PISAPNP_FDO_EXTENSION FdoExt, IN PIRP Irp, IN PIO_STACK_LOCATION IrpSp)
 
NTSTATUS NTAPI IsaFdoPnp (IN PISAPNP_FDO_EXTENSION FdoExt, IN PIRP Irp, IN PIO_STACK_LOCATION IrpSp)
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 11 of file fdo.c.

Function Documentation

◆ IsaFdoPnp()

NTSTATUS NTAPI IsaFdoPnp ( IN PISAPNP_FDO_EXTENSION  FdoExt,
IN PIRP  Irp,
IN PIO_STACK_LOCATION  IrpSp 
)

Definition at line 44 of file fdo.c.

48 {
49  NTSTATUS Status = Irp->IoStatus.Status;
50 
51  switch (IrpSp->MinorFunction)
52  {
55 
56  if (NT_SUCCESS(Status))
57  Status = IsaFdoStartDevice(FdoExt, Irp, IrpSp);
58 
59  Irp->IoStatus.Status = Status;
60 
62  return Status;
63 
64  case IRP_MN_STOP_DEVICE:
65  FdoExt->Common.State = dsStopped;
66 
68  break;
69 
72 
73  Irp->IoStatus.Status = Status;
74 
76  return Status;
77 
79  DPRINT("IRP_MN_FILTER_RESOURCE_REQUIREMENTS\n");
80  break;
81 
82  default:
83  DPRINT1("Unknown PnP code: %x\n", IrpSp->MinorFunction);
84  break;
85  }
86 
88 
89  return IoCallDriver(FdoExt->Ldo, Irp);
90 }
NTSTATUS NTAPI IsaFdoQueryDeviceRelations(IN PISAPNP_FDO_EXTENSION FdoExt, IN PIRP Irp, IN PIO_STACK_LOCATION IrpSp)
Definition: fdo.c:31
_In_ PIRP Irp
Definition: csq.h:116
#define IRP_MN_FILTER_RESOURCE_REQUIREMENTS
LONG NTSTATUS
Definition: precomp.h:26
#define IoCompleteRequest
Definition: irp.c:1240
void DPRINT(...)
Definition: polytest.cpp:61
NTSTATUS NTAPI IsaForwardIrpSynchronous(IN PISAPNP_FDO_EXTENSION FdoExt, IN PIRP Irp)
Definition: isapnp.c:519
#define IRP_MN_STOP_DEVICE
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define IRP_MN_START_DEVICE
Status
Definition: gdiplustypes.h:24
NTSTATUS NTAPI IsaFdoStartDevice(IN PISAPNP_FDO_EXTENSION FdoExt, IN PIRP Irp, IN PIO_STACK_LOCATION IrpSp)
Definition: fdo.c:16
_In_ PIO_STACK_LOCATION IrpSp
Definition: create.c:4137
NTSTATUS NTAPI IoCallDriver(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: irp.c:1218
#define IRP_MN_QUERY_DEVICE_RELATIONS
#define IoSkipCurrentIrpStackLocation(Irp)
Definition: ntifs_ex.h:421
#define DPRINT1
Definition: precomp.h:8
#define IO_NO_INCREMENT
Definition: iotypes.h:570
return STATUS_SUCCESS
Definition: btrfs.c:3014

Referenced by IsaPnp().

◆ IsaFdoQueryDeviceRelations()

NTSTATUS NTAPI IsaFdoQueryDeviceRelations ( IN PISAPNP_FDO_EXTENSION  FdoExt,
IN PIRP  Irp,
IN PIO_STACK_LOCATION  IrpSp 
)

Definition at line 31 of file fdo.c.

35 {
36  if (IrpSp->Parameters.QueryDeviceRelations.Type != BusRelations)
37  return Irp->IoStatus.Status;
38 
39  return IsaPnpFillDeviceRelations(FdoExt, Irp, TRUE);
40 }
_In_ PIRP Irp
Definition: csq.h:116
#define TRUE
Definition: types.h:120
NTSTATUS NTAPI IsaPnpFillDeviceRelations(IN PISAPNP_FDO_EXTENSION FdoExt, IN PIRP Irp, IN BOOLEAN IncludeDataPort)
Definition: isapnp.c:411
_In_ PIO_STACK_LOCATION IrpSp
Definition: create.c:4137
struct _NAMED_PIPE_CREATE_PARAMETERS * Parameters
Definition: iotypes.h:2779

Referenced by IsaFdoPnp().

◆ IsaFdoStartDevice()

NTSTATUS NTAPI IsaFdoStartDevice ( IN PISAPNP_FDO_EXTENSION  FdoExt,
IN PIRP  Irp,
IN PIO_STACK_LOCATION  IrpSp 
)

Definition at line 16 of file fdo.c.

20 {
23 
24  FdoExt->Common.State = dsStarted;
25 
26  return STATUS_SUCCESS;
27 }
_In_ PIRP Irp
Definition: csq.h:116
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
_In_ PIO_STACK_LOCATION IrpSp
Definition: create.c:4137
return STATUS_SUCCESS
Definition: btrfs.c:3014

Referenced by IsaFdoPnp().