@@ -1338,7 +1338,12 @@ USBPORT_InitializeDevice(IN PUSBPORT_DEVICE_HANDLE DeviceHandle,
13381338 FALSE,
13391339 NULL );
13401340
1341+ /* HACK! In some cases, without this next Status is STATUS_UNSUCCESSFUL. */
1342+ //USBPORT_Wait(FdoDevice, 1);
1343+
13411344 DeviceAddress = USBPORT_AllocateUsbAddress (FdoDevice );
1345+ DPRINT ("USBPORT_InitializeDevice: assigning %X address (%p, %p)\n" , DeviceAddress , DeviceHandle , FdoDevice );
1346+
13421347 ASSERT (DeviceHandle -> DeviceAddress == USB_DEFAULT_DEVICE_ADDRESS );
13431348
13441349 RtlZeroMemory (& CtrlSetup , sizeof (USB_DEFAULT_PIPE_SETUP_PACKET ));
@@ -1354,24 +1359,26 @@ USBPORT_InitializeDevice(IN PUSBPORT_DEVICE_HANDLE DeviceHandle,
13541359 NULL ,
13551360 NULL );
13561361
1357- DPRINT ("USBPORT_InitializeDevice: DeviceAddress - %x. SendSetupPacket Status - %x\n" ,
1358- DeviceAddress ,
1359- Status );
1360-
13611362 DeviceHandle -> DeviceAddress = DeviceAddress ;
1363+ DPRINT ("USBPORT_InitializeDevice: DeviceAddress %X\n" , DeviceAddress );
13621364
13631365 if (!NT_SUCCESS (Status ))
1364- goto ExitError ;
1366+ {
1367+ DPRINT1 ("USBPORT_InitializeDevice: Status %X (%p, %p)\n" , Status , DeviceHandle , FdoDevice );
1368+ goto Exit ;
1369+ }
13651370
13661371 Endpoint = DeviceHandle -> PipeHandle .Endpoint ;
13671372
13681373 Endpoint -> EndpointProperties .TotalMaxPacketSize = DeviceHandle -> DeviceDescriptor .bMaxPacketSize0 ;
13691374 Endpoint -> EndpointProperties .DeviceAddress = DeviceAddress ;
13701375
13711376 Status = USBPORT_ReopenPipe (FdoDevice , Endpoint );
1372-
13731377 if (!NT_SUCCESS (Status ))
1374- goto ExitError ;
1378+ {
1379+ DPRINT1 ("USBPORT_InitializeDevice: Status %X\n" , Status );
1380+ goto Exit ;
1381+ }
13751382
13761383 USBPORT_Wait (FdoDevice , 10 );
13771384
@@ -1411,10 +1418,11 @@ USBPORT_InitializeDevice(IN PUSBPORT_DEVICE_HANDLE DeviceHandle,
14111418 }
14121419 else
14131420 {
1414- ExitError :
1415- DPRINT1 ("USBPORT_InitializeDevice: ExitError. Status - %x\n" , Status );
1421+ DPRINT1 ("USBPORT_InitializeDevice: Status %X\n" , Status );
14161422 }
14171423
1424+ Exit :
1425+
14181426 KeReleaseSemaphore (& FdoExtension -> DeviceSemaphore ,
14191427 LOW_REALTIME_PRIORITY ,
14201428 1 ,
@@ -1966,6 +1974,12 @@ USBPORT_InitializeTT(IN PDEVICE_OBJECT FdoDevice,
19661974 HubDeviceHandle ,
19671975 TtNumber );
19681976
1977+ if (TtNumber > 1 )
1978+ {
1979+ DPRINT1 ("USBPORT_InitializeTT: %p, %X\n" , HubDeviceHandle , TtNumber );
1980+ //DbgBreakPoint();
1981+ }
1982+
19691983 FdoExtension = FdoDevice -> DeviceExtension ;
19701984
19711985 TtExtension = ExAllocatePoolWithTag (NonPagedPool ,
0 commit comments