windows-nt/Source/XPSP1/NT/drivers/storage/iscsiprt/client/power.c
2020-09-26 16:20:57 +08:00

54 lines
999 B
C
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*++
Copyright (C) Microsoft Corporation, 2000
Module Name:
power.c
Abstract:
This file contains the routines for power support
Environment:
Kernel mode only
Revision History:
--*/
#include "port.h"
NTSTATUS
iScsiPortPower(
IN PDEVICE_OBJECT DeviceObject,
IN OUT PIRP Irp
)
{
PIO_STACK_LOCATION irpStack = IoGetCurrentIrpStackLocation(Irp);
PCOMMON_EXTENSION commonExtension = DeviceObject->DeviceExtension;
NTSTATUS status;
DebugPrint((1, "iScsiPortPower : DeviceObject %x, Irp %x\n",
DeviceObject, Irp));
switch (irpStack->MinorFunction) {
case IRP_MN_SET_POWER: {
Irp->IoStatus.Status = STATUS_SUCCESS;
break;
}
default: {
Irp->IoStatus.Status = STATUS_SUCCESS;
break;
}
}
PoStartNextPowerIrp(Irp);
IoSkipCurrentIrpStackLocation(Irp);
return PoCallDriver(commonExtension->LowerDeviceObject,
Irp);
}