Author: vmikayelyan
Date: Fri Aug 19 16:13:09 2016
New Revision: 72375
URL:
http://svn.reactos.org/svn/reactos?rev=72375&view=rev
Log:
usb: hub: FDO: Fix PnP handling issues.
There is many cases where we should forward IRP instead of complete it.
Modified:
branches/GSoC_2016/USB/drivers/usb/usbhub/fdo.c
Modified: branches/GSoC_2016/USB/drivers/usb/usbhub/fdo.c
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2016/USB/drivers/usb/usbhu…
==============================================================================
--- branches/GSoC_2016/USB/drivers/usb/usbhub/fdo.c [iso-8859-1] (original)
+++ branches/GSoC_2016/USB/drivers/usb/usbhub/fdo.c [iso-8859-1] Fri Aug 19 16:13:09 2016
@@ -2028,7 +2028,10 @@
{
Status = USBHUB_ParentFDOStartDevice(DeviceObject, Irp);
}
- break;
+
+ Irp->IoStatus.Status = Status;
+ IoCompleteRequest(Irp, IO_NO_INCREMENT);
+ return Status;
}
case IRP_MN_QUERY_DEVICE_RELATIONS:
@@ -2059,17 +2062,17 @@
Irp->IoStatus.Information = (ULONG_PTR)DeviceRelations;
Irp->IoStatus.Status = Status;
- return ForwardIrpAndForget(DeviceObject, Irp);
+ break;
}
case RemovalRelations:
{
DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS /
RemovalRelations\n");
- return ForwardIrpAndForget(DeviceObject, Irp);
+ break;
}
default:
DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / Unknown
type 0x%lx\n",
Stack->Parameters.QueryDeviceRelations.Type);
- return ForwardIrpAndForget(DeviceObject, Irp);
+ break;
}
break;
}
@@ -2078,10 +2081,11 @@
{
DPRINT("IRP_MN_QUERY_STOP_DEVICE\n");
Irp->IoStatus.Status = STATUS_SUCCESS;
- return ForwardIrpAndForget(DeviceObject, Irp);
+ break;
}
case IRP_MN_REMOVE_DEVICE:
{
+ // Should be reworked later in this commits set
DPRINT("IRP_MN_REMOVE_DEVICE\n");
Irp->IoStatus.Status = STATUS_SUCCESS;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
@@ -2093,29 +2097,33 @@
}
case IRP_MN_QUERY_BUS_INFORMATION:
{
+ // Function drivers and filter drivers do not handle this IRP.
DPRINT("IRP_MN_QUERY_BUS_INFORMATION\n");
break;
}
case IRP_MN_QUERY_ID:
{
DPRINT("IRP_MN_QUERY_ID\n");
+ // Function drivers and filter drivers do not handle this IRP.
break;
}
case IRP_MN_QUERY_CAPABILITIES:
{
+ //
+ // If a function or filter driver does not handle this IRP, it
+ // should pass that down.
+ //
DPRINT("IRP_MN_QUERY_CAPABILITIES\n");
break;
}
default:
{
DPRINT(" IRP_MJ_PNP / unknown minor function 0x%lx\n",
Stack->MinorFunction);
- return ForwardIrpAndForget(DeviceObject, Irp);
- }
- }
-
- Irp->IoStatus.Status = Status;
- IoCompleteRequest(Irp, IO_NO_INCREMENT);
- return Status;
+ break;
+ }
+ }
+
+ return ForwardIrpAndForget(DeviceObject, Irp);
}
NTSTATUS