win8 usb3.0 XHCI

Hi all,

I want my usb device driver to run under win8 with the XHCI bus driver
from microsoft.
So far my driver works well with some XHCI drivers from other
manufaturers. It also works with the EHCI driver from microsoft.
Is there any documentation what microsoft has changed compared to the
EHCI bus driver?

There seem to be an issue which prevents the driver beeing loaded within
StartDevice.
It hangs after or during setting the configuration.
I have measured the following transfers on the usb bus:

0 Set Address = 1
1 Get Device Descriptor
2 Get Configuration Descriptor, Index 0 Length 0xFF
3 Get Configuration Descriptor, Index 0 Length 0x105
4 Get String Descriptor 3
5 Get String Descriptor Langid
6 Get String Descriptor 2
7 Get BOS Descriptor
8 Set Sel = 0

About 60 seconds later I get the following debug message which may be
related to my issue:
“Thread 0xFFFFFA80069E4600 is waiting for Client Driver Request to
complete for WDF object 0x0000057FF79A0E68”
Thanks,
/Uwe

What build is this on? Is it a USB 2 or 3 device?

d

debt from my phone


From: uwekirst
Sent: 2/13/2012 7:46 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] win8 usb3.0 XHCI

Hi all,

I want my usb device driver to run under win8 with the XHCI bus driver
from microsoft.
So far my driver works well with some XHCI drivers from other
manufaturers. It also works with the EHCI driver from microsoft.
Is there any documentation what microsoft has changed compared to the
EHCI bus driver?

There seem to be an issue which prevents the driver beeing loaded within
StartDevice.
It hangs after or during setting the configuration.
I have measured the following transfers on the usb bus:

0 Set Address = 1
1 Get Device Descriptor
2 Get Configuration Descriptor, Index 0 Length 0xFF
3 Get Configuration Descriptor, Index 0 Length 0x105
4 Get String Descriptor 3
5 Get String Descriptor Langid
6 Get String Descriptor 2
7 Get BOS Descriptor
8 Set Sel = 0

About 60 seconds later I get the following debug message which may be
related to my issue:
“Thread 0xFFFFFA80069E4600 is waiting for Client Driver Request to
complete for WDF object 0x0000057FF79A0E68”
Thanks,
/Uwe


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

My driver supports different devices which are usb 2 or 3. It hangs in
both cases, it does not matter wether I connect a USB 2 or 3 device.
The bus trace below (0-8) was measured with usb 3 device.
Thanks,
/Uwe

Am 13.02.2012 17:51, schrieb Doron Holan:

What build is this on? Is it a USB 2 or 3 device?

d

debt from my phone

From: uwekirst
Sent: 2/13/2012 7:46 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] win8 usb3.0 XHCI

Hi all,

I want my usb device driver to run under win8 with the XHCI bus driver
from microsoft.
So far my driver works well with some XHCI drivers from other
manufaturers. It also works with the EHCI driver from microsoft.
Is there any documentation what microsoft has changed compared to the
EHCI bus driver?

There seem to be an issue which prevents the driver beeing loaded within
StartDevice.
It hangs after or during setting the configuration.
I have measured the following transfers on the usb bus:

0 Set Address = 1
1 Get Device Descriptor
2 Get Configuration Descriptor, Index 0 Length 0xFF
3 Get Configuration Descriptor, Index 0 Length 0x105
4 Get String Descriptor 3
5 Get String Descriptor Langid
6 Get String Descriptor 2
7 Get BOS Descriptor
8 Set Sel = 0

About 60 seconds later I get the following debug message which may be
related to my issue:
“Thread 0xFFFFFA80069E4600 is waiting for Client Driver Request to
complete for WDF object 0x0000057FF79A0E68”
Thanks,
/Uwe


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Which win8 build number?

d

debt from my phone


From: uwekirst
Sent: 2/13/2012 9:40 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] win8 usb3.0 XHCI

My driver supports different devices which are usb 2 or 3. It hangs in both cases, it does not matter wether I connect a USB 2 or 3 device.
The bus trace below (0-8) was measured with usb 3 device.
Thanks,
/Uwe

Am 13.02.2012 17:51, schrieb Doron Holan:
What build is this on? Is it a USB 2 or 3 device?

d

debt from my phone


From: uwekirst
Sent: 2/13/2012 7:46 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] win8 usb3.0 XHCI

Hi all,

I want my usb device driver to run under win8 with the XHCI bus driver
from microsoft.
So far my driver works well with some XHCI drivers from other
manufaturers. It also works with the EHCI driver from microsoft.
Is there any documentation what microsoft has changed compared to the
EHCI bus driver?

There seem to be an issue which prevents the driver beeing loaded within
StartDevice.
It hangs after or during setting the configuration.
I have measured the following transfers on the usb bus:

0 Set Address = 1
1 Get Device Descriptor
2 Get Configuration Descriptor, Index 0 Length 0xFF
3 Get Configuration Descriptor, Index 0 Length 0x105
4 Get String Descriptor 3
5 Get String Descriptor Langid
6 Get String Descriptor 2
7 Get BOS Descriptor
8 Set Sel = 0

About 60 seconds later I get the following debug message which may be
related to my issue:
“Thread 0xFFFFFA80069E4600 is waiting for Client Driver Request to
complete for WDF object 0x0000057FF79A0E68”
Thanks,
/Uwe


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

It’s the developer preview.
6.2.8102.0 (winmain_win8m3.110823-1455)

Thanks,
/Uwe

Am 13.02.2012 18:50, schrieb Doron Holan:

Which win8 build number?

d

debt from my phone

From: uwekirst
Sent: 2/13/2012 9:40 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] win8 usb3.0 XHCI

My driver supports different devices which are usb 2 or 3. It hangs in
both cases, it does not matter wether I connect a USB 2 or 3 device.
The bus trace below (0-8) was measured with usb 3 device.
Thanks,
/Uwe

Am 13.02.2012 17:51, schrieb Doron Holan:
> What build is this on? Is it a USB 2 or 3 device?
>
> d
>
> debt from my phone
> ------------------------------------------------------------------------
> From: uwekirst
> Sent: 2/13/2012 7:46 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] win8 usb3.0 XHCI
>
> Hi all,
>
> I want my usb device driver to run under win8 with the XHCI bus driver
> from microsoft.
> So far my driver works well with some XHCI drivers from other
> manufaturers. It also works with the EHCI driver from microsoft.
> Is there any documentation what microsoft has changed compared to the
> EHCI bus driver?
>
> There seem to be an issue which prevents the driver beeing loaded within
> StartDevice.
> It hangs after or during setting the configuration.
> I have measured the following transfers on the usb bus:
>
> 0 Set Address = 1
> 1 Get Device Descriptor
> 2 Get Configuration Descriptor, Index 0 Length 0xFF
> 3 Get Configuration Descriptor, Index 0 Length 0x105
> 4 Get String Descriptor 3
> 5 Get String Descriptor Langid
> 6 Get String Descriptor 2
> 7 Get BOS Descriptor
> 8 Set Sel = 0
>
> About 60 seconds later I get the following debug message which may be
> related to my issue:
> “Thread 0xFFFFFA80069E4600 is waiting for Client Driver Request to
> complete for WDF object 0x0000057FF79A0E68”
> Thanks,
> /Uwe
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

From: uwekirst

There seem to be an issue which prevents the driver beeing loaded within
StartDevice.
It hangs after or during setting the configuration.
I have measured the following transfers on the usb bus:

0 Set Address = 1
1 Get Device Descriptor
2 Get Configuration Descriptor, Index 0 Length 0xFF
3 Get Configuration Descriptor, Index 0 Length 0x105
4 Get String Descriptor 3
5 Get String Descriptor Langid
6 Get String Descriptor 2
7 Get BOS Descriptor
8 Set Sel = 0

Is that last one SelectConfiguration? If so, selecting configuration 0
causes the device to be disabled. Does your device handle a
SelectConfiguration for configuration number 0?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

No,
I select configuration 1 within my driver.
Set sel selects the U0-U1 latency. It seems to me that I have measured
only usb access done by the bus driver.
Usb access within my own driver doesn’t seem to work.

/Uwe

Am 13.02.2012 19:15, schrieb Tim Roberts:

From: uwekirst
> There seem to be an issue which prevents the driver beeing loaded within
> StartDevice.
> It hangs after or during setting the configuration.
> I have measured the following transfers on the usb bus:
>
> 0 Set Address = 1
> 1 Get Device Descriptor
> 2 Get Configuration Descriptor, Index 0 Length 0xFF
> 3 Get Configuration Descriptor, Index 0 Length 0x105
> 4 Get String Descriptor 3
> 5 Get String Descriptor Langid
> 6 Get String Descriptor 2
> 7 Get BOS Descriptor
> 8 Set Sel = 0
Is that last one SelectConfiguration? If so, selecting configuration 0
causes the device to be disabled. Does your device handle a
SelectConfiguration for configuration number 0?

Hi all,

I still do not have an idea why my usb device driver does not load with
the XHCI bus driver from microsoft.

A call to IoCallDriver() does not return and hangs forever within start
device in case I want to select the configuration.

I noticed a small difference comparted to other usb bus drivers:
IoCallDriver returns either immediately (reading descriptors etc.) in
windows 8 or hangs (selecting a configuration).
In windows 7 IoCallDriver returns STATUS_PENDING.
Any ideas?

Thanks,
/Uwe

Am 13.02.2012 16:46, schrieb uwekirst:

Hi all,

I want my usb device driver to run under win8 with the XHCI bus driver
from microsoft.

uwekirst wrote:

I still do not have an idea why my usb device driver does not load with
the XHCI bus driver from microsoft.

A call to IoCallDriver() does not return and hangs forever within start
device in case I want to select the configuration.

So, you have successfully fetched the device descriptor and the
configuration descriptor? You have created a USBD_INTERFACE_LIST_ENTRY
array from the configuration descriptor with the interfaces you want to
use? You zeroed all of the structure memory before you started?

Do you want to post your code?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Am 14.02.2012 18:35, schrieb Tim Roberts:

Do you want to post your code?

Here you are, configuration = 1,
/Uwe

NTSTATUS Usb_set_configuration(PDEVICE_EXTENSION dev, int configuration,
int timeout)
{
NTSTATUS status = STATUS_SUCCESS;
URB urb, *urb_ptr = NULL;
USB_CONFIGURATION_DESCRIPTOR *configuration_descriptor = NULL;
USB_INTERFACE_DESCRIPTOR *interface_descriptor = NULL;
USBD_INTERFACE_LIST_ENTRY *interfaces = NULL;
int i, j, interface_number, desc_size;

memset(&urb, 0, sizeof(URB));

TRACE(TL_TRACE, (“Usb_set_configuration() Enter\n”));
TRACE(TL_TRACE, (“Usb_get_config_descriptor()\n”));

configuration_descriptor = Usb_get_config_descriptor(dev, configuration,
&desc_size);
if(!configuration_descriptor)
{
TRACE(TL_TRACE, (“Usb_set_configuration(): getting configuration
descriptor failed\n”));
return STATUS_INVALID_PARAMETER;
}

TRACE(TL_TRACE, (“Usb_get_config_descriptor() Exit 0”));

interfaces =

ExAllocatePoolWithTag(NonPagedPool,(configuration_descriptor->bNumInterfaces

* sizeof(USBD_INTERFACE_LIST_ENTRY), ‘SetC’);

if(!interfaces)
{
ExFreePool(configuration_descriptor);
return STATUS_NO_MEMORY;
}

memset(interfaces, 0, (configuration_descriptor->bNumInterfaces + 1)
* sizeof(USBD_INTERFACE_LIST_ENTRY));

interface_number = 0;

TRACE(TL_TRACE, (“Usb_find_interface_desc bNumInterfaces = %d\n”,
configuration_descriptor->bNumInterfaces));
for(i = 0; i < configuration_descriptor->bNumInterfaces; i++)
{
TRACE(TL_TRACE, (“interface_number = %d\n”, interface_number));
for(j = interface_number; j < MAX_NUMBER_OF_INTERFACES; j++)
{
interface_descriptor =
Usb_find_interface_desc(configuration_descriptor,
desc_size, j, 0);
if(interface_descriptor)
{
interface_number = ++j;
break;
}
}

if(!interface_descriptor)
{

TRACE(TL_TRACE, (“Usb_set_configuration(): unable to find
interface descriptor at index %d\n”, i));

ExFreePool(interfaces);
ExFreePool(configuration_descriptor);
return STATUS_INVALID_PARAMETER;
}
else
{
TRACE(TL_TRACE, (“Usb_set_configuration(): found interface
%d\n”, interface_descriptor->bInterfaceNumber));
interfaces[i].InterfaceDescriptor = interface_descriptor;
}
}

TRACE(TL_TRACE, (“USBD_CreateConfigurationRequestEx\n”));
urb_ptr = USBD_CreateConfigurationRequestEx(configuration_descriptor,
interfaces);

if(!urb_ptr)
{
TRACE(TL_TRACE, (“Usb_set_configuration(): memory allocation
failed\n”));
ExFreePool(interfaces);
ExFreePool(configuration_descriptor);
return STATUS_NO_MEMORY;
}

TRACE(TL_TRACE, (“Usb_call_usbd\n”));
status = Usb_call_usbd(dev, urb_ptr, IOCTL_INTERNAL_USB_SUBMIT_URB,
timeout);

if(!NT_SUCCESS(status) || !USBD_SUCCESS(urb_ptr->UrbHeader.Status))
{

TRACE(TL_TRACE, ("Usb_set_configuration(): setting configuration
%d failed: ", configuration));
TRACE(TL_TRACE, (“status: 0x%x”, status));
TRACE(TL_TRACE, (“urb-status: 0x%x\n”, urb_ptr->UrbHeader.Status));

ExFreePool(interfaces);
ExFreePool(urb_ptr);
ExFreePool(configuration_descriptor);
return status;
}

dev->usb.config.handle =
urb_ptr->UrbSelectConfiguration.ConfigurationHandle;
dev->usb.config.value = configuration;

TRACE(TL_TRACE, (“Usb_clear_pipe_info\n”));
Usb_clear_pipe_info(dev);

TRACE(TL_TRACE, (“Usb_update_pipe_info, bNumInterfaces = %d\n”,
configuration_descriptor->bNumInterfaces));
for(i = 0; i < configuration_descriptor->bNumInterfaces; i++)
{
Usb_update_pipe_info(dev, interfaces[i].Interface);
}

ExFreePool(interfaces);
ExFreePool(urb_ptr);
ExFreePool(configuration_descriptor);
TRACE(TL_TRACE, (“Exit Usb_set_configuration() %d\n”, status));
return status;
}

NTSTATUS Usb_call_usbd(PDEVICE_EXTENSION dev, void *urb, ULONG
control_code,
int timeout)
{
KEVENT event;
NTSTATUS status;
IRP *irp;
IO_STACK_LOCATION *next_irp_stack;
IO_STATUS_BLOCK io_status;
io_status.Status = 0;
io_status.Information = 0;

KeInitializeEvent(&event, NotificationEvent, FALSE);
TRACE(TL_TRACE, (“IoBuildDeviceIoControlRequest\n”));
irp = IoBuildDeviceIoControlRequest(control_code, dev->StackDeviceObject,
NULL, 0, NULL, 0, TRUE,
&event, &io_status);
if(!irp) {
return STATUS_NO_MEMORY;
}

next_irp_stack = IoGetNextIrpStackLocation(irp);
next_irp_stack->Parameters.Others.Argument1 = urb;
next_irp_stack->Parameters.Others.Argument2 = NULL;
TRACE(TL_TRACE, (“IoCallDriver\n”));
status = IoCallDriver(dev->StackDeviceObject, irp);
if(status == STATUS_PENDING) {
TRACE(TL_TRACE, (“status == STATUS_PENDING\n”));
KeWaitForSingleObject (&event, Executive, KernelMode, FALSE, NULL);
status = io_status.Status;
}

TRACE(TL_TRACE, (“Usb_call_usbd: Exit\n”));
return status;
}

uwekirst wrote:

Am 14.02.2012 18:35, schrieb Tim Roberts:
> Do you want to post your code?
Here you are, configuration = 1,

I don’t see anything wrong with that code. Is there something unusual
about your device? Multiple configurations, multiple interfaces,
isochronous devices, bulk streams? None of those are excuses for a
hang, of course, but I’m wondering what makes your device different.

I know you posted part of a bus analyzer trace, but it was abbreviated.
Is the request is making it to the device? Is the device responding?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Am 14.02.2012 20:33, schrieb Tim Roberts:

I don’t see anything wrong with that code. Is there something unusual
about your device? Multiple configurations, multiple interfaces,
isochronous devices, bulk streams? None of those are excuses for a
hang, of course, but I’m wondering what makes your device different.
They have an isochronouse in and out EP, an interrupt EP, and bulk EPs,
one configuration, no bulk streams. Some of my older USB 2.0 devices
have multiple interfaces I think.

I know you posted part of a bus analyzer trace, but it was abbreviated.
Is the request is making it to the device? Is the device responding?

The bus transactions itself that I have measured look ok. But I cannot
match the measured transactions with my sourcecode.
Maybee the XHCI busdriver implements some kind of cache, it detects the
device and copies the content of the descriptors to internal storage.
My driver requests the device descriptor for example, but the request
does not apear on the bus, the busdriver delivers the request from the
internal storage.
Is that possible?
I was not able to measure the select configuration request. The select
configuration request cannot be cached of course.

Thanks,
/Uwe

uwekirst wrote:

The bus transactions itself that I have measured look ok. But I cannot
match the measured transactions with my sourcecode.
Maybee the XHCI busdriver implements some kind of cache, it detects the
device and copies the content of the descriptors to internal storage.
My driver requests the device descriptor for example, but the request
does not apear on the bus, the busdriver delivers the request from the
internal storage.
Is that possible?

It’s possible. The Linux world has debated for years whether it is
appropriate for the kernel to cache the descriptors. The USB spec seems
to allow it.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Hi,

I managed to bypass the deadlock in start device, but got a bsod instead.
The busanalyser shows now 2 additional transactions:

set_configuration 1
set_interface 0, alt setting 0

thanks,

/Uwe

Microsoft (R) Windows Debugger Version 6.2.8102.0 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.

Loading Dump File [C:\Windows\MEMORY.DMP]
Kernel Bitmap Dump File: Only kernel address space is available

Symbol search path is: *** Invalid ***
****************************************************************************
* Symbol loading may be unreliable without a symbol search path. *
* Use .symfix to have the debugger choose a symbol path. *
* After setting your symbol path, use .reload to refresh symbol locations. *
****************************************************************************
Executable search path is:
*********************************************************************
* Symbols can not be loaded because symbol path is not initialized. *
* *
* The Symbol Path can be set by: *
* using the _NT_SYMBOL_PATH environment variable. *
* using the -y <symbol_path> argument when starting the debugger.
using .sympath and .sympath+

ERROR: Symbol file could not be found. Defaulted to export symbols
for ntkrnlmp.exe -
Windows 8 Kernel Version 8102 MP (2 procs) Free x64
Product: WinNt, suite: TerminalServer SingleUserTS
Built by: 8102.109.amd64fre.winmain_win8m3.110912-1733
Machine Name:
Kernel base = 0xfffff8000159e000 PsLoadedModuleList = 0xfffff80001827060
Debug session time: Wed Feb 15 17:54:12.337 2012 (UTC + 1:00)
System Uptime: 0 days 0:01:05.868

Symbols can not be loaded because symbol path is not initialized.

The Symbol Path can be set by:
using the _NT_SYMBOL_PATH environment variable.
using the -y <symbol_path> argument when starting the debugger.
using .sympath and .sympath+

ERROR: Symbol file could not be found. Defaulted to export symbols
for ntkrnlmp.exe -
Loading Kernel Symbols



Loading User Symbols

Loading unloaded module list

TRIAGER: Could not open triage file : C:\Program Files (x86)\Windows
Kits\8.0\Debuggers\x64\triage\oca.ini, error 2
TRIAGER: Could not open triage file : C:\Program Files (x86)\Windows
Kits\8.0\Debuggers\x64\winxp\triage.ini, error 2
TRIAGER: Could not open triage file : C:\Program Files (x86)\Windows
Kits\8.0\Debuggers\x64\triage\user.ini, error 2
*****


Bugcheck
Analysis


******************************************************************

Use !analyze -v to get detailed debugging information.

BugCheck 7E, {ffffffffc0000094, fffff88005cfdce8, fffff880046be0d8,
fffff880046bd910}

ERROR: Module load completed but symbols could not be loaded for
USBXHCI.SYS
ERROR: Module load completed but symbols could not be loaded for
ucx01000.sys
ERROR: Module load completed but symbols could not be loaded for
Wdf01000.sys
ERROR: Symbol file could not be found. Defaulted to export symbols
for UsbHub3.sys -
Kernel symbols are WRONG. Please fix symbols to do analysis.




Either you specified an unqualified symbol, or your debugger
doesn’t have full symbol information. Unqualified symbol
resolution is turned off by default. Please either specify a
fully qualified symbol module!symbolname, or enable resolution
of unqualified symbols by typing “.symopt- 100”. Note that
enabling unqualified symbol resolution with network symbol
server shares in the symbol path may cause the debugger to
appear to hang for long periods of time when an incorrect
symbol name is typed or the network symbol server is down.

For some commands to work properly, your symbol path
must point to .pdb files that have full type information.

Certain .pdb files (such as the public OS symbols) do not
contain the required information. Contact the group that
provided you with these symbols if you need this command to
work.

Type referenced: nt!_KPRCB


TRIAGER: Could not open triage file : C:\Program Files (x86)\Windows
Kits\8.0\Debuggers\x64\triage\modclass.ini, error 2



Either you specified an unqualified symbol, or your debugger
doesn’t have full symbol information. Unqualified symbol
resolution is turned off by default. Please either specify a
fully qualified symbol module!symbolname, or enable resolution
of unqualified symbols by typing “.symopt- 100”. Note that
enabling unqualified symbol resolution with network symbol
server shares in the symbol path may cause the debugger to
appear to hang for long periods of time when an incorrect
symbol name is typed or the network symbol server is down.

For some commands to work properly, your symbol path
must point to .pdb files that have full type information.

Certain .pdb files (such as the public OS symbols) do not
contain the required information. Contact the group that
provided you with these symbols if you need this command to
work.

Type referenced: nt!_KPRCB





Either you specified an unqualified symbol, or your debugger
doesn’t have full symbol information. Unqualified symbol
resolution is turned off by default. Please either specify a
fully qualified symbol module!symbolname, or enable resolution
of unqualified symbols by typing “.symopt- 100”. Note that
enabling unqualified symbol resolution with network symbol
server shares in the symbol path may cause the debugger to
appear to hang for long periods of time when an incorrect
symbol name is typed or the network symbol server is down.

For some commands to work properly, your symbol path
must point to .pdb files that have full type information.

Certain .pdb files (such as the public OS symbols) do not
contain the required information. Contact the group that
provided you with these symbols if you need this command to
work.

Type referenced: nt!_KPRCB


Probably caused by : USBXHCI.SYS ( USBXHCI+11ce8 )

Followup: MachineOwner
---------

1: kd> !sym noisy
noisy mode - symbol prompts on
1: kd> .symfix+
DBGHELP: Symbol Search Path:
DBGHELP: Symbol Search Path:
cache
;SRV
http://msdl.microsoft.com/download/symbols
DBGHELP: Symbol Search Path:
cache
;SRV
http://msdl.microsoft.com/download/symbols
1: kd> .reload
SYMSRV: C:\Program Files (x86)\Windows
Kits\8.0\Debuggers\x64\sym\ntkrnlmp.pdb\97CEC56D611342919C0D84CD3F31D9B62\ntkrnlmp.pdb
not found
SYMSRV: ntkrnlmp.pdb from http://msdl.microsoft.com/download/symbols:
3244071 bytes - copied
DBGHELP: C:\Program Files (x86)\Windows
Kits\8.0\Debuggers\x64\sym\ntkrnlmp.pdb\97CEC56D611342919C0D84CD3F31D9B62\ntkrnlmp.pdb
already cached
DBGHELP: nt - public symbols
C:\Program Files (x86)\Windows
Kits\8.0\Debuggers\x64\sym\ntkrnlmp.pdb\97CEC56D611342919C0D84CD3F31D9B62\ntkrnlmp.pdb
Loading Kernel Symbols



Loading User Symbols

Loading unloaded module list

1: kd> !analyze -v



Bugcheck
Analysis




SYSTEM_THREAD_EXCEPTION_NOT_HANDLED (7e)
This is a very common bugcheck. Usually the exception address pinpoints
the driver/function that caused the problem. Always note this address
as well as the link date of the driver/image that contains this address.
Arguments:
Arg1: ffffffffc0000094, The exception code that was not handled
Arg2: fffff88005cfdce8, The address that the exception occurred at
Arg3: fffff880046be0d8, Exception Record Address
Arg4: fffff880046bd910, Context Record Address

Debugging Details:
------------------

SYMSRV: C:\Program Files (x86)\Windows
Kits\8.0\Debuggers\x64\sym\usbxhci.pdb\269DD9341D0C4283860A9855653305282\usbxhci.pdb
not found
SYMSRV: usbxhci.pdb from http://msdl.microsoft.com/download/symbols:
172560 bytes - copied
DBGHELP: C:\Program Files (x86)\Windows
Kits\8.0\Debuggers\x64\sym\usbxhci.pdb\269DD9341D0C4283860A9855653305282\usbxhci.pdb
already cached
DBGHELP: USBXHCI - public symbols
C:\Program Files (x86)\Windows
Kits\8.0\Debuggers\x64\sym\usbxhci.pdb\269DD9341D0C4283860A9855653305282\usbxhci.pdb
SYMSRV: C:\Program Files (x86)\Windows
Kits\8.0\Debuggers\x64\sym\ucx01000.pdb\6B623FA587EF4098AF96BAF7B383485E2\ucx01000.pdb
not found
SYMSRV: ucx01000.pdb from http://msdl.microsoft.com/download/symbols:
121883 bytes - copied
DBGHELP: C:\Program Files (x86)\Windows
Kits\8.0\Debuggers\x64\sym\ucx01000.pdb\6B623FA587EF4098AF96BAF7B383485E2\ucx01000.pdb
already cached
DBGHELP: ucx01000 - public symbols
C:\Program Files (x86)\Windows
Kits\8.0\Debuggers\x64\sym\ucx01000.pdb\6B623FA587EF4098AF96BAF7B383485E2\ucx01000.pdb
SYMSRV: C:\Program Files (x86)\Windows
Kits\8.0\Debuggers\x64\sym\Wdf01000.pdb\05819D77F6BB4924AD16A4B3055F07041\Wdf01000.pdb
not found
SYMSRV: Wdf01000.pdb from http://msdl.microsoft.com/download/symbols:
266383 bytes - copied
DBGHELP: C:\Program Files (x86)\Windows
Kits\8.0\Debuggers\x64\sym\Wdf01000.pdb\05819D77F6BB4924AD16A4B3055F07041\Wdf01000.pdb
already cached
DBGHELP: Wdf01000 - public symbols
C:\Program Files (x86)\Windows
Kits\8.0\Debuggers\x64\sym\Wdf01000.pdb\05819D77F6BB4924AD16A4B3055F07041\Wdf01000.pdb
SYMSRV: C:\Program Files (x86)\Windows
Kits\8.0\Debuggers\x64\sym\usbhub3.pdb\865D65798AC549298DE54C1DDCA131532\usbhub3.pdb
not found
SYMSRV: usbhub3.pdb from http://msdl.microsoft.com/download/symbols:
250570 bytes - copied
DBGHELP: C:\Program Files (x86)\Windows
Kits\8.0\Debuggers\x64\sym\usbhub3.pdb\865D65798AC549298DE54C1DDCA131532\usbhub3.pdb
already cached
DBGHELP: UsbHub3 - public symbols
C:\Program Files (x86)\Windows
Kits\8.0\Debuggers\x64\sym\usbhub3.pdb\865D65798AC549298DE54C1DDCA131532\usbhub3.pdb
TRIAGER: Could not open triage file : C:\Program Files (x86)\Windows
Kits\8.0\Debuggers\x64\triage\modclass.ini, error 2

EXCEPTION_CODE: (NTSTATUS) 0xc0000094 - {EXCEPTION} Integer division by
zero.

FAULTING_IP:
USBXHCI!TransferRing_Enable+104
fffff88005cfdce8 41f7f0 div eax,r8d<br><br>EXCEPTION_RECORD: fffff880046be0d8 -- (.exr 0xfffff880046be0d8)<br>ExceptionAddress: fffff88005cfdce8 <br>(USBXHCI!TransferRing_Enable+0x0000000000000104)<br> ExceptionCode: c0000094 (Integer divide-by-zero)<br> ExceptionFlags: 00000000<br>NumberParameters: 0<br><br>CONTEXT: fffff880046bd910 -- (.cxr 0xfffff880046bd910)<br>rax=0000000000fffe00 rbx=fffffa80087d9ec0 rcx=0000000000000001<br>rdx=0000000000000000 rsi=fffff88005d13828 rdi=0000000000000001<br>rip=fffff88005cfdce8 rsp=fffff880046be310 rbp=fffffa8007aeba70<br> r8=0000000000000000 r9=0000000000000000 r10=0000000000fffe00<br>r11=fffff880046be2f0 r12=fffff88005d137d8 r13=0000000000000000<br>r14=fffffa80087d96b0 r15=000000000000000c<br>iopl=0 nv up ei pl nz na pe nc<br>cs=0010 ss=0018 ds=002b es=002b fs=0053 gs=002b <br>efl=00010202<br>USBXHCI!TransferRing_Enable+0x104:<br>fffff88005cfdce8 41f7f0 div eax,r8d
Resetting default scope

DEFAULT_BUCKET_ID: WIN8_DRIVER_FAULT

BUGCHECK_STR: AV

PROCESS_NAME: System

CURRENT_IRQL: 0

ERROR_CODE: (NTSTATUS) 0xc0000094 - {EXCEPTION} Integer division by zero.

LAST_CONTROL_TRANSFER: from fffff88005cf447e to fffff88005cfdce8

STACK_TEXT:
fffff880046be310 fffff88005cf447e : 0000000000000000 <br>0000000000000000 fffffa8008560020 fffffa8007a00000 :
USBXHCI!TransferRing_Enable+0x104
fffff880046be350 fffff88005d04cee : 0000000000000000 <br>fffffa8008538810 fffffa8008560020 0000057ff79ff7b8 :
USBXHCI!Endpoint_Enable+0x2be
fffff880046be3f0 fffff88005d2e11c : 0000057ff79ff7b8 <br>0000057ff79ff7b8 0000000000000028 fffffa80079e1000 :
USBXHCI!UsbDevice_UcxEvtEndpointsConfigure+0x242
fffff880046be4d0 fffff88005d2f02c : fffffa8008600840 <br>0000000000000028 fffffa800879e290 0000000000491037 :
ucx01000!UsbDevice_EndpointsConfigureFromHub+0xfc
fffff880046be550 fffff88000e991a8 : fffffa8008600840 <br>fffffa8008600840 fffff880046be630 fffff88000e8a259 :
ucx01000!UsbDevice_EvtMgmtIoInternalDeviceControl+0x380
fffff880046be5f0 fffff88000e98bc2 : fffffa8008600800 <br>fffffa8000000000 fffffa8008600840 fffffa80079d6388 :
Wdf01000!FxIoQueue::DispatchRequestToDriver+0x534
fffff880046be670 fffff88000e980f3 : fffffa8008600840 <br>fffffa8008600800 0000000000000000 fffffa8008600992 :
Wdf01000!FxIoQueue::DispatchEvents+0x592
fffff880046be6f0 fffff88000e4ef42 : fffffa80079d6100 <br>fffffa8008600840 fffffa800854d8b0 fffff880046be818 :
Wdf01000!FxIoQueue::QueueRequest+0x2ab
fffff880046be760 fffff88005d2b39b : fffffa80079d6180 <br>fffffa8008600840 fffff88005d2aa00 fffffa800854d8b0 :
Wdf01000!imp_WdfDeviceWdmDispatchIrpToIoQueue+0x762
fffff880046be810 fffff88000e631ae : 0000000000001200 <br>fffffa80090272d0 000000000000000f 0000057ff84fa498 :
ucx01000!RootHub_Pdo_EvtInternalDeviceControlIrpPreprocessCallback+0x627
fffff880046be8e0 fffff88000e63054 : fffffa800854d8b0 <br>fffff880046be9b0 fffffa80079a7b90 fffffa8008538800 :
Wdf01000!FxDevice::Dispatch+0x106
fffff880046be920 fffff88000e56172 : 0000000000000005 <br>fffff880046be9b0 fffffa8007b05b60 0000000000000000 :
Wdf01000!FxDevice::DispatchWithLock+0xa4
fffff880046be960 fffff88006b0712b : fffffa80072b4740 <br>fffffa80090272d0 fffffa8007b05b60 0000057ff84fa498 :
Wdf01000!imp_WdfRequestSend+0x4ba
fffff880046be9f0 fffff88006b07518 : fffffa80085830c0 <br>fffffa80085832c0 0000000000000fa0 fffff88005cf5834 :
UsbHub3!HUBUCX_SubmitUcxIoctl+0x10b
fffff880046bea70 fffff88006b0627c : 0000000000000fdd <br>fffffa8007a1c5a0 fffffa800879d960 fffff88006b079c2 :
UsbHub3!HUBUCX_EnableDisableEndpointsUsingUCXIoctl+0xdc
fffff880046beab0 fffff88006af72a0 : fffffa800879db50 <br>0000000000000001 fffffa8007a1c631 fffffa800879db48 :
UsbHub3!HUBDSM_ProgrammingEndpointsInControllerForDeviceConfiguration+0x10
fffff880046beae0 fffff88006af80e9 : 0000000000000fdd <br>fffff88000000fa0 fffffa80085832c0 fffffa8008583608 :
UsbHub3!HUBSM_ExecuteEntryFunctionsAndPushPopStateMachinesForCurrentState+0x48
fffff880046beb80 fffff88006af784f : 0000000000000fa0 <br>0000000000000fdd 0000000000000001 fffffa80085832c0 :
UsbHub3!HUBSM_RunStateMachine+0x499
fffff880046bebe0 fffff88005d32e68 : fffffa80085832c0 <br>fffffa8007bf7400 fffffa8007bf74d0 fffffa80081b7080 :
UsbHub3!HUBSM_EvtSmWorkItem+0x3f
fffff880046bec10 fffff8000162810a : fffffa800877a2c0 <br>0000000000000000 fffff88005d32ef8 fffffa8007bf74d0 :
ucx01000!Controller_ForwardProgressWorkItemCallback+0x60
fffff880046bec40 fffff8000161b145 : fffff800017e6b90 <br>fffffa80069bf040 fffff80001628054 fffff800017e6b00 :
nt!IopProcessWorkItem+0xb6
fffff880046becb0 fffff800019510a8 : 0000000000000000 <br>fffffa80069bf040 0000000000000080 0000000080010000 :
nt!ExpWorkerThread+0x12c
fffff880046bed50 fffff800015ded06 : fffff8000184a180 <br>fffffa80069bf040 fffffa8006b148c0 fffffa80069c1680 :
nt!PspSystemThreadStartup+0x58
fffff880046beda0 0000000000000000 : fffff880046bf000 <br>fffff880046b9000 0000000000000000 0000000000000000 :
nt!KiStartSystemThread+0x16

FOLLOWUP_IP:
USBXHCI!TransferRing_Enable+104
fffff880`05cfdce8 41f7f0 div eax,r8d

SYMBOL_STACK_INDEX: 0

SYMBOL_NAME: USBXHCI!TransferRing_Enable+104

FOLLOWUP_NAME: MachineOwner

MODULE_NAME: USBXHCI

IMAGE_NAME: USBXHCI.SYS

DEBUG_FLR_IMAGE_TIMESTAMP: 4e5464e5

STACK_COMMAND: .cxr 0xfffff880046bd910 ; kb

FAILURE_BUCKET_ID: X64_AV_USBXHCI!TransferRing_Enable+104

BUCKET_ID: X64_AV_USBXHCI!TransferRing_Enable+104

Followup: MachineOwner
---------

Am 13.02.2012 16:46, schrieb uwekirst:
> Hi all,
>
> I want my usb device driver to run under win8 with the XHCI bus driver
> from microsoft.
> d other seminars visit: http://www.osr.com/seminars
></symbol_path></symbol_path>

uwekirst wrote:

I managed to bypass the deadlock in start device, but got a bsod instead.
The busanalyser shows now 2 additional transactions:

set_configuration 1
set_interface 0, alt setting 0

Can you post your configuration descriptor? Is it possible you have
your isochronous endpoints included in alternate setting 0, but with the
packet size set to 0? If so, that’s a bug. Your isochronous endpoints
should not be present in alternate setting 0 at all.

However, **IF** that is what is going on here, I would call that a
fairly nasty bug in the XHCI driver. Something like that should never
cause a BSOD.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

You are right, my iso descriptors have packet size 0.
thank you
/Uwe

Am 15.02.2012 18:34, schrieb Tim Roberts:

uwekirst wrote:
> I managed to bypass the deadlock in start device, but got a bsod instead.
> The busanalyser shows now 2 additional transactions:
>
> set_configuration 1
> set_interface 0, alt setting 0
Can you post your configuration descriptor? Is it possible you have
your isochronous endpoints included in alternate setting 0, but with the
packet size set to 0? If so, that’s a bug. Your isochronous endpoints
should not be present in alternate setting 0 at all.

However, **IF** that is what is going on here, I would call that a
fairly nasty bug in the XHCI driver. Something like that should never
cause a BSOD.

I deleted the isochronous endpoints within alt setting 0 and my driver
loads now, thank you.

But there is another issue related to isochronouse transactions.
I want to transfer up to 6k / frame.
My iso descriptors look like this:

Endpoint descriptor:
wmaxpaketsize = 1024

Companion descriptor:
wbytesperinterval = 6144
Burst size = 1 (burst of 2)
Mult = 2 (HBW repeat 3 times)

My understanding of this configuration is:
2 x bursts with 1024 byte each should repeat 3 times = 6144 byte

This works under win7, but with the xhci driver from microsoft under
win8 I measure:
-The IN EP does not start at all
-The OUT EP transfers 2 x 1024 Byte only, the rest is missing.

any ideas?
thanks,
/Uwe

Am 15.02.2012 18:34, schrieb Tim Roberts:

Can you post your configuration descriptor? Is it possible you have
your isochronous endpoints included in alternate setting 0, but with
the packet size set to 0? If so, that’s a bug. Your isochronous
endpoints should not be present in alternate setting 0 at all.
However, **IF** that is what is going on here, I would call that a
fairly nasty bug in the XHCI driver. Something like that should never
cause a BSOD.

uwekirst wrote:

You are right, my iso descriptors have packet size 0.

Aren’t there still some members of the WDK USB team on board here? It
would be worthwhile to note in a bug database somewhere that the new USB
3 stack crashes with a divide by zero error if an isochronous pipe in a
configured interface has a packet size of 0. Even though that’s not the
correct procedure, such devices do exist in the wild.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

uwekirst wrote:

But there is another issue related to isochronouse transactions.
I want to transfer up to 6k / frame.
My iso descriptors look like this:

Endpoint descriptor:
wmaxpaketsize = 1024

Companion descriptor:
wbytesperinterval = 6144
Burst size = 1 (burst of 2)
Mult = 2 (HBW repeat 3 times)

My understanding of this configuration is:
2 x bursts with 1024 byte each should repeat 3 times = 6144 byte

How large are the entries in your IsoPacket array? Are they 6144 bytes?

I have not had the pleasure of working on a USB 3 device yet, so I can’t
offer you any sage advice from personal experience.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Am 16.02.2012 18:56, schrieb Tim Roberts:

uwekirst wrote:
> But there is another issue related to isochronouse transactions.
> I want to transfer up to 6k / frame.
> My iso descriptors look like this:
>
> Endpoint descriptor:
> wmaxpaketsize = 1024
>
> Companion descriptor:
> wbytesperinterval = 6144
> Burst size = 1 (burst of 2)
> Mult = 2 (HBW repeat 3 times)
>
> My understanding of this configuration is:
> 2 x bursts with 1024 byte each should repeat 3 times = 6144 byte
How large are the entries in your IsoPacket array? Are they 6144 bytes?

I have not had the pleasure of working on a USB 3 device yet, so I can’t
offer you any sage advice from personal experience.

The packetsize should be 6144 byte / frame.
Within USB 3 there are two mechanism howto support more than 1024 Byte /
frame. One of them is to send more than one transaction / frame like the
HBW in USB 2. The other one is to do a burst within one transaction.
For OUT EPs it makes no difference wether to do a burst or to use
multiple transactions.
For IN EPs this is important since you get two data packets for one ACK
for example if your are doing a burst of two.
Thanks,
/Uwe