[USBPORT] Correcting USBPORT_InitializeDevice() and USBPORT_RestoreDevice() (DEVICE_HANDLE_FLAG_USB2HUB).

This commit is contained in:
Vadim Galyant 2017-11-28 15:19:46 +09:00 committed by Amine Khaldi
parent 664e48cad5
commit cbba6e80fc
2 changed files with 12 additions and 2 deletions

View file

@ -1377,6 +1377,12 @@ USBPORT_InitializeDevice(IN PUSBPORT_DEVICE_HANDLE DeviceHandle,
(MaxPacketSize == 16) ||
(MaxPacketSize == 32) ||
(MaxPacketSize == 64));
if (DeviceHandle->DeviceSpeed == UsbHighSpeed &&
DeviceHandle->DeviceDescriptor.bDeviceClass == USB_DEVICE_CLASS_HUB)
{
DeviceHandle->Flags |= DEVICE_HANDLE_FLAG_USB2HUB;
}
}
else
{
@ -1761,10 +1767,14 @@ USBPORT_RestoreDevice(IN PDEVICE_OBJECT FdoDevice,
}
}
if (NewDeviceHandle->Flags & DEVICE_HANDLE_FLAG_INITIALIZED)
if (NewDeviceHandle->Flags & DEVICE_HANDLE_FLAG_USB2HUB)
{
DPRINT1("USBPORT_RestoreDevice: FIXME Transaction Translator\n");
NewDeviceHandle->TtCount = OldDeviceHandle->TtCount;
#ifndef NDEBUG
DbgBreakPoint();
#endif
}
while (!IsListEmpty(&OldDeviceHandle->PipeHandleList))

View file

@ -104,7 +104,7 @@
/* Device handle Flags (USBPORT_DEVICE_HANDLE) */
#define DEVICE_HANDLE_FLAG_ROOTHUB 0x00000002
#define DEVICE_HANDLE_FLAG_REMOVED 0x00000008
#define DEVICE_HANDLE_FLAG_INITIALIZED 0x00000010
#define DEVICE_HANDLE_FLAG_USB2HUB 0x00000010
/* Endpoint Flags (USBPORT_ENDPOINT) */
#define ENDPOINT_FLAG_DMA_TYPE 0x00000001