Author: vmikayelyan
Date: Fri Aug 19 15:22:34 2016
New Revision: 72365

URL: http://svn.reactos.org/svn/reactos?rev=72365&view=rev
Log:
usb: hub: fdo: Add debug prints and comments

NO-OP changes.

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/usbhub/fdo.c?rev=72365&r1=72364&r2=72365&view=diff
==============================================================================
--- 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 
15:22:34 2016
@@ -1089,8 +1089,6 @@
     PDEVICE_OBJECT ChildDeviceObject = NULL;
     ULONG Index = 0;
 
-    DPRINT("Removing device on port %d (Child index: %d)\n", PortId, Index);
-
     for (Index = 0; Index < USB_MAXCHILDREN; Index++)
     {
         if (HubDeviceExtension->ChildDeviceObject[Index])
@@ -1114,7 +1112,10 @@
         return STATUS_UNSUCCESSFUL;
     }
 
+    DPRINT("Removing device on port %d (Child index: %d)\n", PortId, Index);
+
     /* Remove the device from the table */
+    // is lock needed?
     HubDeviceExtension->ChildDeviceObject[Index] = NULL;
 
     /* Invalidate device relations for the root hub */
@@ -1414,6 +1415,7 @@
     {
         if (HubDeviceExtension->ChildDeviceObject[i])
         {
+            // The PnP Manager removes the reference when appropriate.
             ObReferenceObject(HubDeviceExtension->ChildDeviceObject[i]);
             HubDeviceExtension->ChildDeviceObject[i]->Flags &= 
~DO_DEVICE_INITIALIZING;
             DeviceRelations->Objects[Children++] = 
HubDeviceExtension->ChildDeviceObject[i];
@@ -1968,6 +1970,7 @@
     {
         case IRP_MN_START_DEVICE:
         {
+            DPRINT("IRP_MN_START_DEVICE\n");
             if (USBHUB_IsRootHubFDO(DeviceObject))
             {
                 // start root hub fdo
@@ -2009,11 +2012,13 @@
         case IRP_MN_QUERY_REMOVE_DEVICE:
         case IRP_MN_QUERY_STOP_DEVICE:
         {
+            DPRINT("IRP_MN_QUERY_STOP_DEVICE\n");
             Irp->IoStatus.Status = STATUS_SUCCESS;
             return ForwardIrpAndForget(DeviceObject, Irp);
         }
         case IRP_MN_REMOVE_DEVICE:
         {
+            DPRINT("IRP_MN_REMOVE_DEVICE\n");
             Irp->IoStatus.Status = STATUS_SUCCESS;
             IoCompleteRequest(Irp, IO_NO_INCREMENT);
 


Reply via email to