mirror of
https://github.com/reactos/reactos.git
synced 2025-04-30 02:58:48 +00:00
xHCI:
* Fix value returned by IRP_MN_QUERY_CAPABILITIES and IOCTL_INTERNAL_USB_GET_ROOT_USB_DEVICE * Remove debug output USBHUB: * Don't enumerate too much children. Display informations about them svn path=/trunk/; revision=17791
This commit is contained in:
parent
98f577158f
commit
f535ffe39f
3 changed files with 35 additions and 23 deletions
|
@ -87,13 +87,9 @@ UsbMpInitMultiSzString(
|
||||||
Source = va_arg(args, PCSZ);
|
Source = va_arg(args, PCSZ);
|
||||||
while (Source != NULL)
|
while (Source != NULL)
|
||||||
{
|
{
|
||||||
DPRINT1("Source = %s\n", Source);
|
|
||||||
RtlInitAnsiString(&AnsiString, 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)
|
DestinationSize += RtlAnsiStringToUnicodeSize(&AnsiString)
|
||||||
+ sizeof(WCHAR) /* final NULL */;
|
+ sizeof(WCHAR) /* final NULL */;
|
||||||
DPRINT1("DestinationSize = %lu\n", DestinationSize);
|
|
||||||
Source = va_arg(args, PCSZ);
|
Source = va_arg(args, PCSZ);
|
||||||
}
|
}
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
|
|
@ -50,7 +50,7 @@ UsbMpDeviceControlPdo(
|
||||||
DeviceExtension = (PUSBMP_DEVICE_EXTENSION)DeviceExtension->FunctionalDeviceObject->DeviceExtension;
|
DeviceExtension = (PUSBMP_DEVICE_EXTENSION)DeviceExtension->FunctionalDeviceObject->DeviceExtension;
|
||||||
|
|
||||||
pRootHubPointer = (PVOID*)Irp->AssociatedIrp.SystemBuffer;
|
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);
|
Information = sizeof(PVOID);
|
||||||
Status = STATUS_SUCCESS;
|
Status = STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -80,7 +80,7 @@ UsbMpPdoQueryId(
|
||||||
ULONG IdType;
|
ULONG IdType;
|
||||||
UNICODE_STRING SourceString;
|
UNICODE_STRING SourceString;
|
||||||
UNICODE_STRING String;
|
UNICODE_STRING String;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status = STATUS_SUCCESS;
|
||||||
|
|
||||||
IdType = IoGetCurrentIrpStackLocation(Irp)->Parameters.QueryId.IdType;
|
IdType = IoGetCurrentIrpStackLocation(Irp)->Parameters.QueryId.IdType;
|
||||||
DeviceExtension = (PUSBMP_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
|
DeviceExtension = (PUSBMP_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
|
||||||
|
@ -96,13 +96,20 @@ UsbMpPdoQueryId(
|
||||||
}
|
}
|
||||||
case BusQueryHardwareIDs:
|
case BusQueryHardwareIDs:
|
||||||
{
|
{
|
||||||
|
//CHAR Buffer[2][40];
|
||||||
DPRINT("USBMP: IRP_MJ_PNP / IRP_MN_QUERY_ID / BusQueryHardwareIDs\n");
|
DPRINT("USBMP: IRP_MJ_PNP / IRP_MN_QUERY_ID / BusQueryHardwareIDs\n");
|
||||||
/* FIXME: Should return
|
|
||||||
USB\ROOT_HUB&VID????&PID????&REV????
|
/*FIXME: sprintf(Buffer[0], "USB\\VID%04X&PID%04X&REV%04X",
|
||||||
USB\ROOT_HUB&VID????&PID????
|
VENDOR,
|
||||||
USB\ROOT_HUB
|
PRODUCT,
|
||||||
*/
|
REV);
|
||||||
UsbMpInitMultiSzString(&SourceString, "USB\\ROOT_HUB", NULL);
|
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;
|
break;
|
||||||
}
|
}
|
||||||
case BusQueryCompatibleIDs:
|
case BusQueryCompatibleIDs:
|
||||||
|
@ -121,11 +128,14 @@ UsbMpPdoQueryId(
|
||||||
return STATUS_NOT_SUPPORTED;
|
return STATUS_NOT_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
Status = UsbMpDuplicateUnicodeString(
|
Status = UsbMpDuplicateUnicodeString(
|
||||||
&String,
|
&String,
|
||||||
&SourceString,
|
&SourceString,
|
||||||
PagedPool);
|
PagedPool);
|
||||||
*Information = (ULONG_PTR)String.Buffer;
|
*Information = (ULONG_PTR)String.Buffer;
|
||||||
|
}
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -184,12 +194,12 @@ UsbMpPnpPdo(
|
||||||
/* FIXME: capabilities can change with connected device */
|
/* FIXME: capabilities can change with connected device */
|
||||||
DeviceCapabilities->LockSupported = FALSE;
|
DeviceCapabilities->LockSupported = FALSE;
|
||||||
DeviceCapabilities->EjectSupported = FALSE;
|
DeviceCapabilities->EjectSupported = FALSE;
|
||||||
DeviceCapabilities->Removable = TRUE;
|
DeviceCapabilities->Removable = FALSE;
|
||||||
DeviceCapabilities->DockDevice = FALSE;
|
DeviceCapabilities->DockDevice = FALSE;
|
||||||
DeviceCapabilities->UniqueID = FALSE;
|
DeviceCapabilities->UniqueID = FALSE;
|
||||||
DeviceCapabilities->SilentInstall = FALSE;
|
DeviceCapabilities->SilentInstall = TRUE;
|
||||||
DeviceCapabilities->RawDeviceOK = TRUE;
|
DeviceCapabilities->RawDeviceOK = FALSE;
|
||||||
DeviceCapabilities->SurpriseRemovalOK = TRUE;
|
DeviceCapabilities->SurpriseRemovalOK = FALSE;
|
||||||
DeviceCapabilities->HardwareDisabled = FALSE; /* FIXME */
|
DeviceCapabilities->HardwareDisabled = FALSE; /* FIXME */
|
||||||
//DeviceCapabilities->NoDisplayInUI = FALSE; /* FIXME */
|
//DeviceCapabilities->NoDisplayInUI = FALSE; /* FIXME */
|
||||||
DeviceCapabilities->DeviceState[0] = PowerDeviceD0; /* FIXME */
|
DeviceCapabilities->DeviceState[0] = PowerDeviceD0; /* FIXME */
|
||||||
|
|
|
@ -66,7 +66,7 @@ UsbhubFdoQueryBusRelations(
|
||||||
dev = DeviceExtension->dev;
|
dev = DeviceExtension->dev;
|
||||||
|
|
||||||
/* Create PDOs that are missing */
|
/* Create PDOs that are missing */
|
||||||
for (i = 0; i < USB_MAXCHILDREN; i++)
|
for (i = 0; i < dev->maxchild; i++)
|
||||||
{
|
{
|
||||||
if (dev->children[i] == NULL)
|
if (dev->children[i] == NULL)
|
||||||
{
|
{
|
||||||
|
@ -110,7 +110,13 @@ UsbhubFdoQueryBusRelations(
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
goto ByeBye;
|
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",
|
sprintf(Buffer[0], "USB\\Vid_%04x&Pid_%04x&Rev_%04x",
|
||||||
PdoExtension->dev->descriptor.idVendor,
|
PdoExtension->dev->descriptor.idVendor,
|
||||||
PdoExtension->dev->descriptor.idProduct,
|
PdoExtension->dev->descriptor.idProduct,
|
||||||
|
|
Loading…
Reference in a new issue