mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 18:25:58 +00:00
Correctly support USB hubs
svn path=/trunk/; revision=21908
This commit is contained in:
parent
f53dbb4e60
commit
1d77bcb312
1 changed files with 22 additions and 1 deletions
|
@ -29,6 +29,28 @@ UsbhubDeviceControlPdo(
|
||||||
|
|
||||||
switch (Stack->Parameters.DeviceIoControl.IoControlCode)
|
switch (Stack->Parameters.DeviceIoControl.IoControlCode)
|
||||||
{
|
{
|
||||||
|
case IOCTL_INTERNAL_USB_GET_ROOT_USB_DEVICE:
|
||||||
|
{
|
||||||
|
PHUB_DEVICE_EXTENSION DeviceExtension;
|
||||||
|
|
||||||
|
DPRINT("Usbhub: IOCTL_INTERNAL_USB_GET_ROOT_USB_DEVICE\n");
|
||||||
|
if (Irp->AssociatedIrp.SystemBuffer == NULL
|
||||||
|
|| Stack->Parameters.DeviceIoControl.OutputBufferLength != sizeof(PVOID))
|
||||||
|
{
|
||||||
|
Status = STATUS_INVALID_PARAMETER;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
PVOID* pHubPointer;
|
||||||
|
DeviceExtension = (PHUB_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
|
||||||
|
|
||||||
|
pHubPointer = (PVOID*)Irp->AssociatedIrp.SystemBuffer;
|
||||||
|
*pHubPointer = DeviceExtension->dev;
|
||||||
|
Information = sizeof(PVOID);
|
||||||
|
Status = STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
DPRINT1("Usbhub: Unknown IOCTL code 0x%lx\n", Stack->Parameters.DeviceIoControl.IoControlCode);
|
DPRINT1("Usbhub: Unknown IOCTL code 0x%lx\n", Stack->Parameters.DeviceIoControl.IoControlCode);
|
||||||
|
@ -52,7 +74,6 @@ UsbhubPdoStartDevice(
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
DeviceExtension = (PHUB_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
|
DeviceExtension = (PHUB_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
|
||||||
DbgBreakPoint();
|
|
||||||
|
|
||||||
/* Register and activate device interface */
|
/* Register and activate device interface */
|
||||||
Status = IoRegisterDeviceInterface(
|
Status = IoRegisterDeviceInterface(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue