--- trunk/reactos/drivers/usb/miniport/common/misc.c 2005-09-10 23:01:56 UTC (rev 17790)
+++ trunk/reactos/drivers/usb/miniport/common/misc.c 2005-09-10 23:50:28 UTC (rev 17791)
@@ -87,13 +87,9 @@
Source = va_arg(args, PCSZ);
while (Source != NULL)
{
- DPRINT1("Source = %s\n", Source);
RtlInitAnsiString(&AnsiString, Source);
- DPRINT1("AnsiString = %Z\n", &AnsiString);
- DPRINT1("NLS_MB_CODE_PAGE_TAG = %lu\n", (ULONG)NLS_MB_CODE_PAGE_TAG);
DestinationSize += RtlAnsiStringToUnicodeSize(&AnsiString)
+ sizeof(WCHAR) /* final NULL */;
- DPRINT1("DestinationSize = %lu\n", DestinationSize);
Source = va_arg(args, PCSZ);
}
va_end(args);
--- trunk/reactos/drivers/usb/miniport/common/pdo.c 2005-09-10 23:01:56 UTC (rev 17790)
+++ trunk/reactos/drivers/usb/miniport/common/pdo.c 2005-09-10 23:50:28 UTC (rev 17791)
@@ -50,7 +50,7 @@
DeviceExtension = (PUSBMP_DEVICE_EXTENSION)DeviceExtension->FunctionalDeviceObject->DeviceExtension;
pRootHubPointer = (PVOID*)Irp->AssociatedIrp.SystemBuffer;
- *pRootHubPointer = (PVOID)DeviceExtension->pdev->bus; /* struct usb_device* */
+ *pRootHubPointer = ((struct usb_hcd*)DeviceExtension->pdev->data)->self.root_hub;
Information = sizeof(PVOID);
Status = STATUS_SUCCESS;
}
@@ -80,7 +80,7 @@
ULONG IdType;
UNICODE_STRING SourceString;
UNICODE_STRING String;
- NTSTATUS Status;
+ NTSTATUS Status = STATUS_SUCCESS;
IdType = IoGetCurrentIrpStackLocation(Irp)->Parameters.QueryId.IdType;
DeviceExtension = (PUSBMP_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
@@ -96,13 +96,20 @@
}
case BusQueryHardwareIDs:
{
+ //CHAR Buffer[2][40];
DPRINT("USBMP: IRP_MJ_PNP / IRP_MN_QUERY_ID / BusQueryHardwareIDs\n");
- /* FIXME: Should return
- USB\ROOT_HUB&VID????&PID????&REV????
- USB\ROOT_HUB&VID????&PID????
- USB\ROOT_HUB
- */
- UsbMpInitMultiSzString(&SourceString, "USB\\ROOT_HUB", NULL);
+
+ /*FIXME: sprintf(Buffer[0], "USB\\VID%04X&PID%04X&REV%04X",
+ VENDOR,
+ PRODUCT,
+ REV);
+ sprintf(Buffer[1], "USB\\VID%04X&PID%04X",
+ VENDOR,
+ PRODUCT);
+ Status = UsbMpInitMultiSzString(
+ &SourceString,
+ Buffer[0], Buffer[1], "USB\\ROOT_HUB", NULL);*/
+ Status = UsbMpInitMultiSzString(&SourceString, "USB\\ROOT_HUB", NULL);
break;
}
case BusQueryCompatibleIDs:
@@ -121,11 +128,14 @@
return STATUS_NOT_SUPPORTED;
}
- Status = UsbMpDuplicateUnicodeString(
- &String,
- &SourceString,
- PagedPool);
- *Information = (ULONG_PTR)String.Buffer;
+ if (NT_SUCCESS(Status))
+ {
+ Status = UsbMpDuplicateUnicodeString(
+ &String,
+ &SourceString,
+ PagedPool);
+ *Information = (ULONG_PTR)String.Buffer;
+ }
return Status;
}
@@ -184,12 +194,12 @@
/* FIXME: capabilities can change with connected device */
DeviceCapabilities->LockSupported = FALSE;
DeviceCapabilities->EjectSupported = FALSE;
- DeviceCapabilities->Removable = TRUE;
+ DeviceCapabilities->Removable = FALSE;
DeviceCapabilities->DockDevice = FALSE;
DeviceCapabilities->UniqueID = FALSE;
- DeviceCapabilities->SilentInstall = FALSE;
- DeviceCapabilities->RawDeviceOK = TRUE;
- DeviceCapabilities->SurpriseRemovalOK = TRUE;
+ DeviceCapabilities->SilentInstall = TRUE;
+ DeviceCapabilities->RawDeviceOK = FALSE;
+ DeviceCapabilities->SurpriseRemovalOK = FALSE;
DeviceCapabilities->HardwareDisabled = FALSE; /* FIXME */
//DeviceCapabilities->NoDisplayInUI = FALSE; /* FIXME */
DeviceCapabilities->DeviceState[0] = PowerDeviceD0; /* FIXME */
--- trunk/reactos/drivers/usb/usbhub/fdo.c 2005-09-10 23:01:56 UTC (rev 17790)
+++ trunk/reactos/drivers/usb/usbhub/fdo.c 2005-09-10 23:50:28 UTC (rev 17791)
@@ -66,7 +66,7 @@
dev = DeviceExtension->dev;
/* Create PDOs that are missing */
- for (i = 0; i < USB_MAXCHILDREN; i++)
+ for (i = 0; i < dev->maxchild; i++)
{
if (dev->children[i] == NULL)
{
@@ -110,7 +110,13 @@
if (!NT_SUCCESS(Status))
goto ByeBye;
-
+ DPRINT1("child #%lu: USB\\Vid_%04x&Pid_%04x&Rev_%04x (class %x:%x)\n",
+ i,
+ PdoExtension->dev->descriptor.idVendor,
+ PdoExtension->dev->descriptor.idProduct,
+ PdoExtension->dev->descriptor.bcdDevice,
+ PdoExtension->dev->descriptor.bDeviceClass,
+ PdoExtension->dev->descriptor.bDeviceSubClass);
sprintf(Buffer[0], "USB\\Vid_%04x&Pid_%04x&Rev_%04x",
PdoExtension->dev->descriptor.idVendor,
PdoExtension->dev->descriptor.idProduct,