Author: janderwald
Date: Sun May 26 17:18:19 2013
New Revision: 59084
URL:
http://svn.reactos.org/svn/reactos?rev=59084&view=rev
Log:
[USBSTOR]
- Hackplement IRP_MJ_POWER support
- Inspired by Thomas (Blame him ;))
Modified:
trunk/reactos/drivers/usb/usbstor/usbstor.c
Modified: trunk/reactos/drivers/usb/usbstor/usbstor.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbstor/usbsto…
==============================================================================
--- trunk/reactos/drivers/usb/usbstor/usbstor.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/usb/usbstor/usbstor.c [iso-8859-1] Sun May 26 17:18:19 2013
@@ -212,12 +212,24 @@
PDEVICE_OBJECT DeviceObject,
PIRP Irp)
{
- UNIMPLEMENTED
-
- Irp->IoStatus.Information = 0;
- Irp->IoStatus.Status = STATUS_SUCCESS;
- IoCompleteRequest(Irp, IO_NO_INCREMENT);
- return STATUS_SUCCESS;
+ PFDO_DEVICE_EXTENSION DeviceExtension;
+
+ // get common device extension
+ DeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
+
+ if (DeviceExtension->Common.IsFDO)
+ {
+ PoStartNextPowerIrp(Irp);
+ IoSkipCurrentIrpStackLocation(Irp);
+ return PoCallDriver(DeviceExtension->LowerDeviceObject, Irp);
+ }
+ else
+ {
+ PoStartNextPowerIrp(Irp);
+ Irp->IoStatus.Status = STATUS_SUCCESS;
+ IoCompleteRequest(Irp, IO_NO_INCREMENT);
+ return STATUS_SUCCESS;
+ }
}