mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
Implement IRP_MJ_CLEANUP for UHCI controller
svn path=/trunk/; revision=16124
This commit is contained in:
parent
8098dc0a97
commit
697e997b8f
4 changed files with 43 additions and 2 deletions
24
reactos/drivers/usb/cromwell/uhci/cleanup.c
Normal file
24
reactos/drivers/usb/cromwell/uhci/cleanup.c
Normal file
|
@ -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;
|
||||
}
|
|
@ -244,6 +244,15 @@ DispatchClose(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
|||
return IrpStub(DeviceObject, Irp);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
|
@ -289,6 +298,7 @@ DriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegPath)
|
|||
|
||||
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;
|
||||
|
|
|
@ -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 @@ UhciClose(
|
|||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp);
|
||||
|
||||
/* create.c */
|
||||
NTSTATUS STDCALL
|
||||
UhciCreate(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp);
|
||||
|
||||
/* fdo.c */
|
||||
NTSTATUS STDCALL
|
||||
UhciPnpFdo(
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue