mirror of
https://github.com/reactos/reactos.git
synced 2024-10-15 13:45:58 +00:00
- Implement DeviceHandleToUsbDevice and remove IsHandleValid.
- Add call to DeviceHandleToUsbDevice for all Direct Call functions that pass DeviceHandle. - Stop the processing of Asynchronous List after the Control Request has been processed by controller. - Misc changes. svn path=/trunk/; revision=47958
This commit is contained in:
parent
f1023cae8f
commit
df7159d459
|
@ -4,7 +4,7 @@
|
||||||
* FILE: drivers/usb/usbehci/common.c
|
* FILE: drivers/usb/usbehci/common.c
|
||||||
* PURPOSE: Common operations in FDO/PDO.
|
* PURPOSE: Common operations in FDO/PDO.
|
||||||
* PROGRAMMERS:
|
* PROGRAMMERS:
|
||||||
* Michael Martin
|
* Michael Martin (mjmartin@reactos.org)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define INITGUID
|
#define INITGUID
|
||||||
|
@ -135,7 +135,7 @@ DuplicateUnicodeString(ULONG Flags, PCUNICODE_STRING SourceString, PUNICODE_STRI
|
||||||
if (Flags & RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE)
|
if (Flags & RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE)
|
||||||
DestMaxLength += sizeof(UNICODE_NULL);
|
DestMaxLength += sizeof(UNICODE_NULL);
|
||||||
|
|
||||||
DestinationString->Buffer = ExAllocatePool(PagedPool, DestMaxLength);
|
DestinationString->Buffer = ExAllocatePoolWithTag(NonPagedPool, DestMaxLength, USB_POOL_TAG);
|
||||||
if (DestinationString->Buffer == NULL)
|
if (DestinationString->Buffer == NULL)
|
||||||
return STATUS_NO_MEMORY;
|
return STATUS_NO_MEMORY;
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "usbehci.h"
|
#include "usbehci.h"
|
||||||
|
#include <hubbusif.h>
|
||||||
|
#include <usbbusif.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Get SymblicName from Parameters in Registry Key
|
Get SymblicName from Parameters in Registry Key
|
||||||
|
@ -121,3 +123,14 @@ GetPhysicalDeviceObjectName(PDEVICE_OBJECT DeviceObject)
|
||||||
return ObjectName;
|
return ObjectName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PUSB_DEVICE DeviceHandleToUsbDevice(PPDO_DEVICE_EXTENSION PdoDeviceExtension, PUSB_DEVICE_HANDLE DeviceHandle)
|
||||||
|
{
|
||||||
|
LONG i;
|
||||||
|
|
||||||
|
for (i=0; i<127; i++)
|
||||||
|
{
|
||||||
|
if (PdoDeviceExtension->UsbDevices[i] == (PUSB_DEVICE)DeviceHandle)
|
||||||
|
return (PUSB_DEVICE)DeviceHandle;
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
|
@ -446,7 +446,6 @@ PdoDispatchPnp(
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Status = IoSetDeviceInterfaceState(&InterfaceSymLinkName, TRUE);
|
Status = IoSetDeviceInterfaceState(&InterfaceSymLinkName, TRUE);
|
||||||
DPRINT1("Set interface state %x\n", Status);
|
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
ASSERT(FALSE);
|
ASSERT(FALSE);
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,6 +82,9 @@ IntializeHeadQueueForStandardRequest(PQUEUE_HEAD QueueHead,
|
||||||
|
|
||||||
(*CtrlTD2)->NextPointer = TERMINATE_POINTER;
|
(*CtrlTD2)->NextPointer = TERMINATE_POINTER;
|
||||||
(*CtrlTD2)->AlternateNextPointer = TERMINATE_POINTER;
|
(*CtrlTD2)->AlternateNextPointer = TERMINATE_POINTER;
|
||||||
|
if (Size == 0)
|
||||||
|
(*CtrlTD2)->BufferPointer[0] = 0;
|
||||||
|
else
|
||||||
(*CtrlTD2)->BufferPointer[0] = (ULONG)MmGetPhysicalAddress((PVOID) (*CtrlData)).LowPart;
|
(*CtrlTD2)->BufferPointer[0] = (ULONG)MmGetPhysicalAddress((PVOID) (*CtrlData)).LowPart;
|
||||||
(*CtrlTD2)->Token.Bits.DataToggle = TRUE;
|
(*CtrlTD2)->Token.Bits.DataToggle = TRUE;
|
||||||
(*CtrlTD2)->Token.Bits.InterruptOnComplete = TRUE;
|
(*CtrlTD2)->Token.Bits.InterruptOnComplete = TRUE;
|
||||||
|
@ -98,6 +101,7 @@ IntializeHeadQueueForStandardRequest(PQUEUE_HEAD QueueHead,
|
||||||
(*CtrlTD3)->Token.Bits.Active = TRUE;
|
(*CtrlTD3)->Token.Bits.Active = TRUE;
|
||||||
(*CtrlTD3)->Token.Bits.PIDCode = PID_CODE_OUT_TOKEN;
|
(*CtrlTD3)->Token.Bits.PIDCode = PID_CODE_OUT_TOKEN;
|
||||||
(*CtrlTD3)->Token.Bits.InterruptOnComplete = TRUE;
|
(*CtrlTD3)->Token.Bits.InterruptOnComplete = TRUE;
|
||||||
|
(*CtrlTD3)->Token.Bits.TotalBytesToTransfer = 0;
|
||||||
(*CtrlTD3)->Token.Bits.DataToggle = TRUE;
|
(*CtrlTD3)->Token.Bits.DataToggle = TRUE;
|
||||||
(*CtrlTD3)->Token.Bits.ErrorCounter = 0x03;
|
(*CtrlTD3)->Token.Bits.ErrorCounter = 0x03;
|
||||||
(*CtrlTD2)->NextPointer = (ULONG) MmGetPhysicalAddress((PVOID)(*CtrlTD3)).LowPart;
|
(*CtrlTD2)->NextPointer = (ULONG) MmGetPhysicalAddress((PVOID)(*CtrlTD3)).LowPart;
|
||||||
|
@ -185,12 +189,15 @@ ExecuteControlRequest(PFDO_DEVICE_EXTENSION DeviceExtension, PUSB_DEFAULT_PIPE_S
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
KeStallExecutionProcessor(10);
|
KeStallExecutionProcessor(100);
|
||||||
DPRINT("Waiting for completion!\n");
|
DPRINT("Waiting for completion!\n");
|
||||||
if (DeviceExtension->AsyncComplete == TRUE)
|
if (DeviceExtension->AsyncComplete == TRUE)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UsbCmd->Run = FALSE;
|
||||||
|
WRITE_REGISTER_ULONG((PULONG)(Base + EHCI_USBCMD), tmp);
|
||||||
|
|
||||||
if (CtrlSetup->bmRequestType._BM.Dir == BMREQUEST_DEVICE_TO_HOST)
|
if (CtrlSetup->bmRequestType._BM.Dir == BMREQUEST_DEVICE_TO_HOST)
|
||||||
{
|
{
|
||||||
if ((Buffer) && (BufferLength))
|
if ((Buffer) && (BufferLength))
|
||||||
|
|
|
@ -419,14 +419,6 @@ typedef struct _PDO_DEVICE_EXTENSION
|
||||||
FAST_MUTEX ListLock;
|
FAST_MUTEX ListLock;
|
||||||
} PDO_DEVICE_EXTENSION, *PPDO_DEVICE_EXTENSION;
|
} PDO_DEVICE_EXTENSION, *PPDO_DEVICE_EXTENSION;
|
||||||
|
|
||||||
typedef struct _WORKITEM_DATA
|
|
||||||
{
|
|
||||||
PIO_WORKITEM IoWorkItem;
|
|
||||||
PPDO_DEVICE_EXTENSION PdoDeviceExtension;
|
|
||||||
PDEVICE_OBJECT PortDeviceObject;
|
|
||||||
} WORKITEM_DATA, *PWORKITEM_DATA;
|
|
||||||
|
|
||||||
|
|
||||||
VOID NTAPI
|
VOID NTAPI
|
||||||
UrbWorkerThread(PVOID Context);
|
UrbWorkerThread(PVOID Context);
|
||||||
|
|
||||||
|
@ -478,5 +470,5 @@ CompletePendingURBRequest(PPDO_DEVICE_EXTENSION DeviceExtension);
|
||||||
VOID
|
VOID
|
||||||
URBRequestCancel (PDEVICE_OBJECT DeviceObject, PIRP Irp);
|
URBRequestCancel (PDEVICE_OBJECT DeviceObject, PIRP Irp);
|
||||||
|
|
||||||
VOID NTAPI
|
PUSB_DEVICE
|
||||||
DeviceArrivalWorkItem(PDEVICE_OBJECT DeviceObject, PVOID Context);
|
DeviceHandleToUsbDevice(PPDO_DEVICE_EXTENSION PdoDeviceExtension, PUSB_DEVICE_HANDLE DeviceHandle);
|
||||||
|
|
|
@ -11,4 +11,5 @@
|
||||||
<file>irp.c</file>
|
<file>irp.c</file>
|
||||||
<file>usbiffn.c</file>
|
<file>usbiffn.c</file>
|
||||||
<file>urbreq.c</file>
|
<file>urbreq.c</file>
|
||||||
|
<file>usbehci.rc</file>
|
||||||
</module>
|
</module>
|
||||||
|
|
|
@ -38,27 +38,6 @@ PVOID InternalCreateUsbDevice(UCHAR DeviceNumber, ULONG Port, PUSB_DEVICE Parent
|
||||||
return UsbDevicePointer;
|
return UsbDevicePointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOLEAN
|
|
||||||
IsHandleValid(PVOID BusContext,
|
|
||||||
PUSB_DEVICE_HANDLE DeviceHandle)
|
|
||||||
{
|
|
||||||
PPDO_DEVICE_EXTENSION PdoDeviceExtension;
|
|
||||||
LONG i;
|
|
||||||
|
|
||||||
PdoDeviceExtension = (PPDO_DEVICE_EXTENSION) BusContext;
|
|
||||||
|
|
||||||
if (!DeviceHandle)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
for (i = 0; i < 128; i++)
|
|
||||||
{
|
|
||||||
if (PdoDeviceExtension->UsbDevices[i] == DeviceHandle)
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
USB_BUSIFFN
|
USB_BUSIFFN
|
||||||
InterfaceReference(PVOID BusContext)
|
InterfaceReference(PVOID BusContext)
|
||||||
|
@ -86,10 +65,19 @@ CreateUsbDevice(PVOID BusContext,
|
||||||
PUSB_DEVICE UsbDevice;
|
PUSB_DEVICE UsbDevice;
|
||||||
LONG i = 0;
|
LONG i = 0;
|
||||||
PdoDeviceExtension = (PPDO_DEVICE_EXTENSION)((PDEVICE_OBJECT)BusContext)->DeviceExtension;
|
PdoDeviceExtension = (PPDO_DEVICE_EXTENSION)((PDEVICE_OBJECT)BusContext)->DeviceExtension;
|
||||||
DPRINT1("CreateUsbDevice: HubDeviceHandle %x, PortStatus %x, PortNumber %x\n", HubDeviceHandle, PortStatus, PortNumber);
|
DPRINT("CreateUsbDevice: HubDeviceHandle %x, PortStatus %x, PortNumber %x\n", HubDeviceHandle, PortStatus, PortNumber);
|
||||||
|
|
||||||
|
if (PdoDeviceExtension->UsbDevices[0] != HubDeviceHandle)
|
||||||
|
{
|
||||||
|
DPRINT1("Not a valid HubDeviceHandle\n");
|
||||||
|
return STATUS_DEVICE_NOT_CONNECTED;
|
||||||
|
}
|
||||||
|
|
||||||
UsbDevice = InternalCreateUsbDevice(PdoDeviceExtension->ChildDeviceCount, PortNumber, HubDeviceHandle, FALSE);
|
UsbDevice = InternalCreateUsbDevice(PdoDeviceExtension->ChildDeviceCount, PortNumber, HubDeviceHandle, FALSE);
|
||||||
|
|
||||||
|
if (!UsbDevice)
|
||||||
|
return STATUS_INSUFFICIENT_RESOURCES;
|
||||||
|
|
||||||
/* Add it to the list */
|
/* Add it to the list */
|
||||||
while (TRUE)
|
while (TRUE)
|
||||||
{
|
{
|
||||||
|
@ -131,7 +119,14 @@ InitializeUsbDevice(PVOID BusContext, PUSB_DEVICE_HANDLE DeviceHandle)
|
||||||
DPRINT1("InitializeUsbDevice called, device %x\n", DeviceHandle);
|
DPRINT1("InitializeUsbDevice called, device %x\n", DeviceHandle);
|
||||||
PdoDeviceExtension = (PPDO_DEVICE_EXTENSION)((PDEVICE_OBJECT)BusContext)->DeviceExtension;
|
PdoDeviceExtension = (PPDO_DEVICE_EXTENSION)((PDEVICE_OBJECT)BusContext)->DeviceExtension;
|
||||||
FdoDeviceExtension = (PFDO_DEVICE_EXTENSION)PdoDeviceExtension->ControllerFdo->DeviceExtension;
|
FdoDeviceExtension = (PFDO_DEVICE_EXTENSION)PdoDeviceExtension->ControllerFdo->DeviceExtension;
|
||||||
UsbDevice = (PUSB_DEVICE) DeviceHandle;
|
|
||||||
|
UsbDevice = DeviceHandleToUsbDevice(BusContext, DeviceHandle);
|
||||||
|
|
||||||
|
if (!UsbDevice)
|
||||||
|
{
|
||||||
|
DPRINT1("Invalid DeviceHandle or device not connected\n");
|
||||||
|
return STATUS_DEVICE_NOT_CONNECTED;
|
||||||
|
}
|
||||||
|
|
||||||
Buffer = ExAllocatePoolWithTag(NonPagedPool, PAGE_SIZE, USB_POOL_TAG);
|
Buffer = ExAllocatePoolWithTag(NonPagedPool, PAGE_SIZE, USB_POOL_TAG);
|
||||||
|
|
||||||
|
@ -153,7 +148,7 @@ InitializeUsbDevice(PVOID BusContext, PUSB_DEVICE_HANDLE DeviceHandle)
|
||||||
CtrlSetup.wLength = 0;
|
CtrlSetup.wLength = 0;
|
||||||
|
|
||||||
DPRINT1("Setting Address to %x\n", UsbDevice->Address);
|
DPRINT1("Setting Address to %x\n", UsbDevice->Address);
|
||||||
ResultOk = ExecuteControlRequest(FdoDeviceExtension, &CtrlSetup, 0, 0, NULL, 0);
|
ResultOk = ExecuteControlRequest(FdoDeviceExtension, &CtrlSetup, 0, UsbDevice->Port, NULL, 0);
|
||||||
|
|
||||||
/* Get the Device Descriptor */
|
/* Get the Device Descriptor */
|
||||||
CtrlSetup.bmRequestType._BM.Recipient = BMREQUEST_TO_DEVICE;
|
CtrlSetup.bmRequestType._BM.Recipient = BMREQUEST_TO_DEVICE;
|
||||||
|
@ -177,7 +172,10 @@ InitializeUsbDevice(PVOID BusContext, PUSB_DEVICE_HANDLE DeviceHandle)
|
||||||
DPRINT1("bNumDescriptors %x\n", UsbDevice->DeviceDescriptor.bNumConfigurations);
|
DPRINT1("bNumDescriptors %x\n", UsbDevice->DeviceDescriptor.bNumConfigurations);
|
||||||
|
|
||||||
if (UsbDevice->DeviceDescriptor.bNumConfigurations == 0)
|
if (UsbDevice->DeviceDescriptor.bNumConfigurations == 0)
|
||||||
|
{
|
||||||
|
DPRINT1("No Configurations. That cant be good!\n");
|
||||||
return STATUS_DEVICE_DATA_ERROR;
|
return STATUS_DEVICE_DATA_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
UsbDevice->Configs = ExAllocatePoolWithTag(NonPagedPool,
|
UsbDevice->Configs = ExAllocatePoolWithTag(NonPagedPool,
|
||||||
sizeof(PVOID) * UsbDevice->DeviceDescriptor.bNumConfigurations,
|
sizeof(PVOID) * UsbDevice->DeviceDescriptor.bNumConfigurations,
|
||||||
|
@ -256,8 +254,14 @@ GetUsbDescriptors(PVOID BusContext,
|
||||||
PUSB_DEVICE UsbDevice;
|
PUSB_DEVICE UsbDevice;
|
||||||
DPRINT1("GetUsbDescriptor %x, %x, %x, %x\n", DeviceDescriptorBuffer, *DeviceDescriptorBufferLength, ConfigDescriptorBuffer, *ConfigDescriptorBufferLength);
|
DPRINT1("GetUsbDescriptor %x, %x, %x, %x\n", DeviceDescriptorBuffer, *DeviceDescriptorBufferLength, ConfigDescriptorBuffer, *ConfigDescriptorBufferLength);
|
||||||
|
|
||||||
UsbDevice = (PUSB_DEVICE) DeviceHandle;
|
UsbDevice = DeviceHandleToUsbDevice(BusContext, DeviceHandle);
|
||||||
DPRINT1("DeviceHandle %x\n", UsbDevice);
|
|
||||||
|
if (!UsbDevice)
|
||||||
|
{
|
||||||
|
DPRINT1("Invalid DeviceHandle or device not connected\n");
|
||||||
|
return STATUS_DEVICE_NOT_CONNECTED;
|
||||||
|
}
|
||||||
|
|
||||||
if ((DeviceDescriptorBuffer) && (DeviceDescriptorBufferLength))
|
if ((DeviceDescriptorBuffer) && (DeviceDescriptorBufferLength))
|
||||||
{
|
{
|
||||||
RtlCopyMemory(DeviceDescriptorBuffer, &UsbDevice->DeviceDescriptor, sizeof(USB_DEVICE_DESCRIPTOR));
|
RtlCopyMemory(DeviceDescriptorBuffer, &UsbDevice->DeviceDescriptor, sizeof(USB_DEVICE_DESCRIPTOR));
|
||||||
|
@ -284,13 +288,13 @@ RemoveUsbDevice(PVOID BusContext, PUSB_DEVICE_HANDLE DeviceHandle, ULONG Flags)
|
||||||
|
|
||||||
PdoDeviceExtension = (PPDO_DEVICE_EXTENSION)((PDEVICE_OBJECT)BusContext)->DeviceExtension;
|
PdoDeviceExtension = (PPDO_DEVICE_EXTENSION)((PDEVICE_OBJECT)BusContext)->DeviceExtension;
|
||||||
|
|
||||||
/* FIXME: Implement DeviceHandleToUsbDevice to validate handles */
|
UsbDevice = DeviceHandleToUsbDevice(BusContext, DeviceHandle);
|
||||||
//UsbDevice = DeviceHandleToUsbDevice(PdoDeviceExtension, DeviceHandle);
|
|
||||||
|
|
||||||
UsbDevice = (PUSB_DEVICE) DeviceHandle;
|
|
||||||
|
|
||||||
if (!UsbDevice)
|
if (!UsbDevice)
|
||||||
|
{
|
||||||
|
DPRINT1("Invalid DeviceHandle or device not connected\n");
|
||||||
return STATUS_DEVICE_NOT_CONNECTED;
|
return STATUS_DEVICE_NOT_CONNECTED;
|
||||||
|
}
|
||||||
|
|
||||||
switch (Flags)
|
switch (Flags)
|
||||||
{
|
{
|
||||||
|
@ -320,11 +324,11 @@ RemoveUsbDevice(PVOID BusContext, PUSB_DEVICE_HANDLE DeviceHandle, ULONG Flags)
|
||||||
/* DeConfig Device */
|
/* DeConfig Device */
|
||||||
break;
|
break;
|
||||||
case USBD_KEEP_DEVICE_DATA:
|
case USBD_KEEP_DEVICE_DATA:
|
||||||
DPRINT("USBD_KEEP_DEVICE_DATA Not implemented!\n");
|
DPRINT1("USBD_KEEP_DEVICE_DATA Not implemented!\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case USBD_MARK_DEVICE_BUSY:
|
case USBD_MARK_DEVICE_BUSY:
|
||||||
DPRINT("USBD_MARK_DEVICE_BUSY Not implemented!\n");
|
DPRINT1("USBD_MARK_DEVICE_BUSY Not implemented!\n");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
DPRINT1("Unknown Remove Flags %x\n", Flags);
|
DPRINT1("Unknown Remove Flags %x\n", Flags);
|
||||||
|
@ -357,17 +361,18 @@ QueryDeviceInformation(PVOID BusContext,
|
||||||
PULONG LengthReturned)
|
PULONG LengthReturned)
|
||||||
{
|
{
|
||||||
PUSB_DEVICE_INFORMATION_0 DeviceInfo = DeviceInformationBuffer;
|
PUSB_DEVICE_INFORMATION_0 DeviceInfo = DeviceInformationBuffer;
|
||||||
PUSB_DEVICE UsbDevice = (PUSB_DEVICE) DeviceHandle;
|
PUSB_DEVICE UsbDevice;
|
||||||
ULONG SizeNeeded;
|
ULONG SizeNeeded;
|
||||||
LONG i;
|
LONG i;
|
||||||
|
|
||||||
DPRINT1("QueryDeviceInformation (%x, %x, %x, %d, %x\n", BusContext, DeviceHandle, DeviceInformationBuffer, DeviceInformationBufferLength, LengthReturned);
|
DPRINT1("QueryDeviceInformation (%x, %x, %x, %d, %x\n", BusContext, DeviceHandle, DeviceInformationBuffer, DeviceInformationBufferLength, LengthReturned);
|
||||||
|
|
||||||
/* Search for a valid usb device in this BusContext */
|
UsbDevice = DeviceHandleToUsbDevice(BusContext, DeviceHandle);
|
||||||
if (!IsHandleValid(BusContext, DeviceHandle))
|
|
||||||
|
if (!UsbDevice)
|
||||||
{
|
{
|
||||||
DPRINT1("Not a valid DeviceHandle\n");
|
DPRINT1("Invalid DeviceHandle or device not connected\n");
|
||||||
return STATUS_INVALID_PARAMETER;
|
return STATUS_DEVICE_NOT_CONNECTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
SizeNeeded = FIELD_OFFSET(USB_DEVICE_INFORMATION_0, PipeList[UsbDevice->ActiveInterface->InterfaceDescriptor.bNumEndpoints]);
|
SizeNeeded = FIELD_OFFSET(USB_DEVICE_INFORMATION_0, PipeList[UsbDevice->ActiveInterface->InterfaceDescriptor.bNumEndpoints]);
|
||||||
|
@ -505,7 +510,17 @@ PVOID
|
||||||
USB_BUSIFFN
|
USB_BUSIFFN
|
||||||
GetDeviceBusContext(PVOID HubBusContext, PVOID DeviceHandle)
|
GetDeviceBusContext(PVOID HubBusContext, PVOID DeviceHandle)
|
||||||
{
|
{
|
||||||
|
PUSB_DEVICE UsbDevice;
|
||||||
|
|
||||||
DPRINT1("GetDeviceBusContext called\n");
|
DPRINT1("GetDeviceBusContext called\n");
|
||||||
|
UsbDevice = DeviceHandleToUsbDevice(HubBusContext, DeviceHandle);
|
||||||
|
|
||||||
|
if (!UsbDevice)
|
||||||
|
{
|
||||||
|
DPRINT1("Invalid DeviceHandle or device not connected\n");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -549,6 +564,14 @@ VOID
|
||||||
USB_BUSIFFN
|
USB_BUSIFFN
|
||||||
FlushTransfers(PVOID BusContext, PVOID DeviceHandle)
|
FlushTransfers(PVOID BusContext, PVOID DeviceHandle)
|
||||||
{
|
{
|
||||||
|
PUSB_DEVICE UsbDevice;
|
||||||
|
UsbDevice = DeviceHandleToUsbDevice(BusContext, DeviceHandle);
|
||||||
|
|
||||||
|
if (!UsbDevice)
|
||||||
|
{
|
||||||
|
DPRINT1("Invalid DeviceHandle or device not connected\n");
|
||||||
|
}
|
||||||
|
|
||||||
DPRINT1("FlushTransfers\n");
|
DPRINT1("FlushTransfers\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -611,5 +634,5 @@ USB_BUSIFFN
|
||||||
EnumLogEntry(PVOID BusContext, ULONG DriverTag, ULONG EnumTag, ULONG P1, ULONG P2)
|
EnumLogEntry(PVOID BusContext, ULONG DriverTag, ULONG EnumTag, ULONG P1, ULONG P2)
|
||||||
{
|
{
|
||||||
DPRINT1("EnumLogEntry called\n");
|
DPRINT1("EnumLogEntry called\n");
|
||||||
return STATUS_NOT_SUPPORTED;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue