Fix little bug which prevented IRP_MJ_PNP to be forwarded to lower driver

Set eol-style to native for usbstor driver files

svn path=/trunk/; revision=20256
This commit is contained in:
Hervé Poussineau 2005-12-18 20:50:26 +00:00
parent 3bd41ed164
commit 290837445f
9 changed files with 10 additions and 9 deletions

View file

@ -100,7 +100,7 @@ DriverEntry(
DriverObject->DriverUnload = DriverUnload;
DriverObject->DriverExtension->AddDevice = SerenumAddDevice;
for (i = 0; i < IRP_MJ_MAXIMUM_FUNCTION; i++)
for (i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; i++)
DriverObject->MajorFunction[i] = IrpStub;
//DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION] = SerialQueryInformation;

View file

@ -29,7 +29,7 @@ DriverEntry(
DriverObject->DriverUnload = DriverUnload;
DriverObject->DriverExtension->AddDevice = SerialAddDevice;
for (i = 0; i < IRP_MJ_MAXIMUM_FUNCTION; i++)
for (i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; i++)
DriverObject->MajorFunction[i] = ForwardIrpAndForget;
DriverObject->MajorFunction[IRP_MJ_CREATE] = SerialCreate;
DriverObject->MajorFunction[IRP_MJ_CLOSE] = SerialClose;

View file

@ -798,7 +798,7 @@ DriverEntry(
DriverObject->DriverExtension->AddDevice = ClassAddDevice;
DriverObject->DriverUnload = DriverUnload;
for (i = 0; i < IRP_MJ_MAXIMUM_FUNCTION; i++)
for (i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; i++)
DriverObject->MajorFunction[i] = IrpStub;
DriverObject->MajorFunction[IRP_MJ_CREATE] = ClassCreate;

View file

@ -136,6 +136,7 @@ IrpStub(
/* Forward some IRPs to lower device */
switch (IoGetCurrentIrpStackLocation(Irp)->MajorFunction)
{
case IRP_MJ_PNP:
case IRP_MJ_INTERNAL_DEVICE_CONTROL:
return ForwardIrpAndForget(DeviceObject, Irp);
default:
@ -788,7 +789,7 @@ DriverEntry(
DriverObject->DriverExtension->AddDevice = ClassAddDevice;
DriverObject->DriverUnload = DriverUnload;
for (i = 0; i < IRP_MJ_MAXIMUM_FUNCTION; i++)
for (i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; i++)
DriverObject->MajorFunction[i] = IrpStub;
DriverObject->MajorFunction[IRP_MJ_CREATE] = ClassCreate;

View file

@ -150,7 +150,7 @@ DriverEntry(
DriverObject->DriverUnload = DriverUnload;
DriverObject->DriverExtension->AddDevice = SermouseAddDevice;
for (i = 0; i < IRP_MJ_MAXIMUM_FUNCTION; i++)
for (i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; i++)
DriverObject->MajorFunction[i] = IrpStub;
DriverObject->MajorFunction[IRP_MJ_CREATE] = SermouseCreate;

View file

@ -50,7 +50,7 @@ PciIdeXInitialize(
DriverObject->DriverExtension->AddDevice = PciIdeXAddDevice;
for (i = 0; i < IRP_MJ_MAXIMUM_FUNCTION; i++)
for (i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; i++)
DriverObject->MajorFunction[i] = ForwardIrpAndForget;
DriverObject->MajorFunction[IRP_MJ_PNP] = PciIdeXPnpDispatch;

View file

@ -401,7 +401,7 @@ DriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegPath)
DriverObject->DriverUnload = DriverUnload;
DriverObject->DriverExtension->AddDevice = AddDevice;
for (i = 0; i < IRP_MJ_MAXIMUM_FUNCTION; i++)
for (i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; i++)
DriverObject->MajorFunction[i] = IrpStub;
DriverObject->MajorFunction[IRP_MJ_CREATE] = DispatchCreate;

View file

@ -179,7 +179,7 @@ DriverEntry(
DriverObject->DriverExtension->AddDevice = UsbhubAddDevice;
for (i = 0; i < IRP_MJ_MAXIMUM_FUNCTION; i++)
for (i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; i++)
DriverObject->MajorFunction[i] = IrpStub;
DriverObject->MajorFunction[IRP_MJ_CREATE] = UsbhubCreate;

View file

@ -130,7 +130,7 @@ DriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegPath)
DriverObject->DriverUnload = DriverUnload;
DriverObject->DriverExtension->AddDevice = AddDevice;
for (i = 0; i < IRP_MJ_MAXIMUM_FUNCTION; i++)
for (i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; i++)
DriverObject->MajorFunction[i] = IrpStub;
DriverObject->DriverStartIo = (PVOID)StartIo;