mirror of
https://github.com/reactos/reactos.git
synced 2024-09-08 03:40:17 +00:00
![Victor Perevertkin](/assets/img/avatar_default.png)
Basic functions are implemented in order to work in PnP stack, only legacy (non-pnp) miniport drivers are supported. Tested mostly with uniata CORE-17132
42 lines
1.1 KiB
C
42 lines
1.1 KiB
C
/*
|
|
* PROJECT: ReactOS Storage Stack / SCSIPORT storage port library
|
|
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
|
* PURPOSE: PnP power handlers
|
|
* COPYRIGHT: Copyright 2016 Thomas Faber <thomas.faber@reactos.org>
|
|
*/
|
|
|
|
#include "scsiport.h"
|
|
|
|
|
|
NTSTATUS
|
|
NTAPI
|
|
ScsiPortDispatchPower(
|
|
_In_ PDEVICE_OBJECT DeviceObject,
|
|
_Inout_ PIRP Irp)
|
|
{
|
|
PSCSI_PORT_COMMON_EXTENSION comExt = DeviceObject->DeviceExtension;
|
|
|
|
if (comExt->IsFDO)
|
|
{
|
|
PoStartNextPowerIrp(Irp);
|
|
IoSkipCurrentIrpStackLocation(Irp);
|
|
return PoCallDriver(comExt->LowerDevice, Irp);
|
|
}
|
|
else
|
|
{
|
|
PIO_STACK_LOCATION ioStack = IoGetCurrentIrpStackLocation(Irp);
|
|
switch (ioStack->MinorFunction)
|
|
{
|
|
case IRP_MN_SET_POWER:
|
|
case IRP_MN_QUERY_POWER:
|
|
Irp->IoStatus.Status = STATUS_SUCCESS;
|
|
break;
|
|
}
|
|
|
|
NTSTATUS status = Irp->IoStatus.Status;
|
|
PoStartNextPowerIrp(Irp);
|
|
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
|
return status;
|
|
}
|
|
}
|