* FILE: drivers/usb/usbehci/usbehci.c
* PURPOSE: USB EHCI device driver.
* PROGRAMMERS:
- * Michael Martin
+ * Michael Martin (michael.martin@reactos.org)
*/
/* DEFINES *******************************************************************/
#include "usbehci.h"
-static NTSTATUS NTAPI
-IrpStub(PDEVICE_OBJECT DeviceObject, PIRP Irp)
-{
- NTSTATUS Status;
-
- if (((PCOMMON_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->IsFdo)
- {
- DPRINT1("ehci: FDO stub for major function 0x%lx\n",
- IoGetCurrentIrpStackLocation(Irp)->MajorFunction);
- return ForwardIrpAndForget(DeviceObject, Irp);
- }
-
- /* We are lower driver, So complete */
- DPRINT1("ehci: PDO stub for major function 0x%lx\n",
- IoGetCurrentIrpStackLocation(Irp)->MajorFunction);
-
- Status = Irp->IoStatus.Status;
- IoCompleteRequest(Irp, IO_NO_INCREMENT);
- return Status;
-}
-
NTSTATUS NTAPI
DispatchDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp)
{
{
DPRINT("DispatchInternalDeviceControl\n");
if (((PCOMMON_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->IsFdo)
- return IrpStub(DeviceObject, Irp);
+ {
+ return FdoDispatchInternalDeviceControl(DeviceObject, Irp);
+ }
else
return PdoDispatchInternalDeviceControl(DeviceObject, Irp);
}
VOID NTAPI
DriverUnload(PDRIVER_OBJECT DriverObject)
{
- DPRINT1("Unloading Driver\n");
+ DPRINT("Unloading Driver\n");
/* FIXME: Clean up */
}
DPRINT1("Driver Entry %wZ!\n", RegistryPath);
DriverObject->DriverExtension->AddDevice = AddDevice;
-
DriverObject->MajorFunction[IRP_MJ_CREATE] = UsbEhciCreate;
DriverObject->MajorFunction[IRP_MJ_CLOSE] = UsbEhciClose;
DriverObject->MajorFunction[IRP_MJ_CLEANUP] = UsbEhciCleanup;
DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = DispatchDeviceControl;
DriverObject->MajorFunction[IRP_MJ_INTERNAL_DEVICE_CONTROL] = DispatchInternalDeviceControl;
DriverObject->MajorFunction[IRP_MJ_PNP] = DispatchPnp;
-
+
DriverObject->DriverUnload = DriverUnload;
DPRINT1("Driver entry done\n");