ReactOS 0.4.15-dev-5669-g09dde2c
power.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Storage Stack / SCSIPORT storage port library
3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4 * PURPOSE: PnP power handlers
5 * COPYRIGHT: Copyright 2016 Thomas Faber <thomas.faber@reactos.org>
6 */
7
8#include "scsiport.h"
9
10
16{
17 PSCSI_PORT_COMMON_EXTENSION comExt = DeviceObject->DeviceExtension;
18
19 if (comExt->IsFDO)
20 {
23 return PoCallDriver(comExt->LowerDevice, Irp);
24 }
25 else
26 {
28 switch (ioStack->MinorFunction)
29 {
32 Irp->IoStatus.Status = STATUS_SUCCESS;
33 break;
34 }
35
36 NTSTATUS status = Irp->IoStatus.Status;
39 return status;
40 }
41}
LONG NTSTATUS
Definition: precomp.h:26
_In_ PIRP Irp
Definition: csq.h:116
#define _Inout_
Definition: ms_sal.h:378
#define _In_
Definition: ms_sal.h:308
#define IoSkipCurrentIrpStackLocation(Irp)
Definition: ntifs_ex.h:421
#define IoCompleteRequest
Definition: irp.c:1240
VOID NTAPI PoStartNextPowerIrp(IN PIRP Irp)
Definition: power.c:746
DRIVER_DISPATCH ScsiPortDispatchPower
Definition: scsiport.h:426
#define STATUS_SUCCESS
Definition: shellext.h:65
PDEVICE_OBJECT LowerDevice
Definition: scsiport.h:139
Definition: ps.c:97
#define NTAPI
Definition: typedefs.h:36
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(_In_ PIRP Irp)
Definition: iofuncs.h:2793
#define IO_NO_INCREMENT
Definition: iotypes.h:598
#define IRP_MN_SET_POWER
#define IRP_MN_QUERY_POWER