[USBHUB]
[reactos.git] / drivers / usb / usbhub_new / pdo.c
index 6632c02..fe7e7eb 100644 (file)
@@ -191,7 +191,7 @@ USBHUB_PdoHandleInternalDeviceControl(
             //
             // Set the real device handle
             //
-            DPRINT("UsbdDeviceHandle %x, ChildDeviceHandle %x\n", Urb->UrbHeader.UsbdDeviceHandle, ChildDeviceExtension->UsbDeviceHandle);
+            //DPRINT("UsbdDeviceHandle %x, ChildDeviceHandle %x\n", Urb->UrbHeader.UsbdDeviceHandle, ChildDeviceExtension->UsbDeviceHandle);
 
             Urb->UrbHeader.UsbdDeviceHandle = ChildDeviceExtension->UsbDeviceHandle;
 
@@ -284,8 +284,8 @@ USBHUB_PdoHandleInternalDeviceControl(
                         DPRINT1("Connect %x\n", ((PortStatus.Status & USB_PORT_STATUS_CONNECT) << 1) << ((PortId - 1) * 2));
                         DPRINT1("Enable %x\n", ((PortStatus.Status & USB_PORT_STATUS_ENABLE) >> 1) << ((PortId - 1) * 2));
                         *PortStatusBits +=
-                            ((PortStatus.Status & USB_PORT_STATUS_CONNECT) << 1) << ((PortId - 1) * 2) +
-                            ((PortStatus.Status & USB_PORT_STATUS_ENABLE) >> 1) << ((PortId - 1) * 2);
+                            (((PortStatus.Status & USB_PORT_STATUS_CONNECT) << 1) << ((PortId - 1) * 2)) +
+                            (((PortStatus.Status & USB_PORT_STATUS_ENABLE) >> 1) << ((PortId - 1) * 2));
                         
                     }
                 }
@@ -429,7 +429,17 @@ USBHUB_PdoQueryDeviceText(
         case DeviceTextLocationInformation:
         {
             DPRINT1("IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_TEXT / DeviceTextDescription\n");
-            SourceString = &ChildDeviceExtension->usTextDescription;
+
+            //
+            // does the device provide a text description
+            //
+            if (ChildDeviceExtension->usTextDescription->Buffer && ChildDeviceExtension->usTextDescription->Length)
+            {
+                //
+                // use device text
+                //
+                SourceString = &ChildDeviceExtension->usTextDescription;
+            }
             break;
         }
         default: