Implement IRP_MJ_CLEANUP for UHCI controller Added: trunk/reactos/drivers/usb/cromwell/uhci/cleanup.c Modified: trunk/reactos/drivers/usb/cromwell/uhci/uhci.c Modified: trunk/reactos/drivers/usb/cromwell/uhci/uhci.h Modified: trunk/reactos/drivers/usb/cromwell/uhci/uhci.xml _____
Added: trunk/reactos/drivers/usb/cromwell/uhci/cleanup.c --- trunk/reactos/drivers/usb/cromwell/uhci/cleanup.c 2005-06-19 22:13:41 UTC (rev 16123) +++ trunk/reactos/drivers/usb/cromwell/uhci/cleanup.c 2005-06-19 22:19:11 UTC (rev 16124) @@ -0,0 +1,24 @@
+/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS UHCI controller driver (Cromwell type) + * FILE: drivers/usb/cromwell/uhci/cleanup.c + * PURPOSE: IRP_MJ_CLEANUP operations + * + * PROGRAMMERS: HervÚ Poussineau (hpoussin@reactos.com) + */ + +#define NDEBUG +#include "uhci.h" + +NTSTATUS STDCALL +UhciCleanup( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + DPRINT("UHCI: IRP_MJ_CLEANUP\n"); + + Irp->IoStatus.Information = 0; + Irp->IoStatus.Status = STATUS_SUCCESS; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return STATUS_SUCCESS; +} Property changes on: trunk/reactos/drivers/usb/cromwell/uhci/cleanup.c ___________________________________________________________________ Name: svn:eol-style + native _____
Modified: trunk/reactos/drivers/usb/cromwell/uhci/uhci.c --- trunk/reactos/drivers/usb/cromwell/uhci/uhci.c 2005-06-19 22:13:41 UTC (rev 16123) +++ trunk/reactos/drivers/usb/cromwell/uhci/uhci.c 2005-06-19 22:19:11 UTC (rev 16124) @@ -245,6 +245,15 @@
}
static NTSTATUS STDCALL +DispatchCleanup(PDEVICE_OBJECT DeviceObject, PIRP Irp) +{ + if (((POHCI_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->IsFDO) + return UhciCleanup(DeviceObject, Irp); + else + return IrpStub(DeviceObject, Irp); +} + +static NTSTATUS STDCALL DispatchDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { if (((POHCI_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->IsFDO) @@ -289,6 +298,7 @@
DriverObject->MajorFunction[IRP_MJ_CREATE] = DispatchCreate; DriverObject->MajorFunction[IRP_MJ_CLOSE] = DispatchClose; + DriverObject->MajorFunction[IRP_MJ_CLEANUP] = DispatchCleanup; DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = DispatchDeviceControl; DriverObject->MajorFunction[IRP_MJ_PNP] = DispatchPnp; DriverObject->MajorFunction[IRP_MJ_POWER] = DispatchPower; _____
Modified: trunk/reactos/drivers/usb/cromwell/uhci/uhci.h --- trunk/reactos/drivers/usb/cromwell/uhci/uhci.h 2005-06-19 22:13:41 UTC (rev 16123) +++ trunk/reactos/drivers/usb/cromwell/uhci/uhci.h 2005-06-19 22:19:11 UTC (rev 16124) @@ -12,9 +12,9 @@
#define USB_UHCI_TAG TAG('u','s','b','u')
-/* create.c */ +/* cleanup.c */ NTSTATUS STDCALL -UhciCreate( +UhciCleanup( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp);
@@ -24,6 +24,12 @@ IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp);
+/* create.c */ +NTSTATUS STDCALL +UhciCreate( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp); + /* fdo.c */ NTSTATUS STDCALL UhciPnpFdo( _____
Modified: trunk/reactos/drivers/usb/cromwell/uhci/uhci.xml --- trunk/reactos/drivers/usb/cromwell/uhci/uhci.xml 2005-06-19 22:13:41 UTC (rev 16123) +++ trunk/reactos/drivers/usb/cromwell/uhci/uhci.xml 2005-06-19 22:19:11 UTC (rev 16124) @@ -7,6 +7,7 @@
<library>ntoskrnl</library> <library>hal</library> <library>usbcore</library> + <file>cleanup.c</file> <file>close.c</file> <file>create.c</file> <file>fdo.c</file>