Problems with USB ISO transfers on XP

Hi all,

has anyone else observed the following problem as well?

We are talking about USB 1.1 ISO transfers on Windows XP using an UHC (Intel chip set). If the total number of iso frames (the product of FramesPerBuffer and NumberOfBuffers) that is used by the USB device driver exceeds some magic limit then invalid USB traffic is generated by the host controller. The HC issues two or more IN or OUT tokens per USB frame. This is not conform with the USB specification which defines exactly one iso token per frame.

I do not know the exact value of the “magic limit” because it seems to be different on various machines. I got correct results with 5 buffers and 32 iso frames per buffer for example, but incorrect behavior with 16 buffers.

The problem seems to be caused by bugs in the UHC driver. The problem will not be solved by the latest updates for XP available at the Microsoft web site.

Thank you very much for any comments.


Udo Eberhardt
Thesycon GmbH, Germany
xxxxx@thesycon.de
www.thesycon.de

HI Udo Eberhardt

if the total no. of frames > 255 , then you will see the below problem I
believe . It is dependent of Pipe MaximumPakcetSize . Let us say Pipe’s
Maximum transfer size is set to 4096 . You need to check the no. of frames
with actual Maximum Packet size first. if it is greater than 255 , then you
need to split the request in multiples of 255 .

NoOfFrames = pIsoOutPipe->MaximumTransferSize /
pIsoOutPipe->MaximumPacketSize;
if(NoOfFrames > 0xff )
NoOfFrames = 0xff;
PresentMaxTransferSize = NoOfFrames *
pDevExt->pIsoOutPipe->MaximumPacketSize;

I hope this helps.

srinivasa

-----Original Message-----
From: Udo Eberhardt [mailto:xxxxx@thesycon.de]
Sent: Friday, May 10, 2002 6:07 AM
To: NT Developers Interest List
Subject: [ntdev] Problems with USB ISO transfers on XP

Hi all,

has anyone else observed the following problem as well?

We are talking about USB 1.1 ISO transfers on Windows XP using an UHC (Intel
chip set). If the total number of iso frames (the product of FramesPerBuffer
and NumberOfBuffers) that is used by the USB device driver exceeds some
magic limit then invalid USB traffic is generated by the host controller.
The HC issues two or more IN or OUT tokens per USB frame. This is not
conform with the USB specification which defines exactly one iso token per
frame.

I do not know the exact value of the “magic limit” because it seems to be
different on various machines. I got correct results with 5 buffers and 32
iso frames per buffer for example, but incorrect behavior with 16 buffers.

The problem seems to be caused by bugs in the UHC driver. The problem will
not be solved by the latest updates for XP available at the Microsoft web
site.

Thank you very much for any comments.


Udo Eberhardt
Thesycon GmbH, Germany
xxxxx@thesycon.de
www.thesycon.de


You are currently subscribed to ntdev as: xxxxx@microtune.com
To unsubscribe send a blank email to %%email.unsub%%

Hi,

the strange thing is that the documentation states the max. number of iso frames is 1024, not 255. Also strange is that there is no error code returned when the buffer is submitted, instead of this invalid USB tokens are generated.

Furthermore, having a max of 255 iso frames pending means there is only buffer space for max. 255 milliseconds. If a user mode thread that processes the buffers has a poor response time then this will be a problem.

BTW, we observed another phenomenon on XP in the meantime: Each switch to a new iso buffer seems to need a significant amount of CPU cycles. If you use iso buffers containing 32 frames (buffer switch period = 32ms) then on a PIII 800 you can observe a CPU load of 30%. This was not the case on W2K. This effect seems also be caused by a bad implementation of the UHCI driver.

Ok, one could use larger buffers, 128 frames for example. But, then the total delay in the data path will increase. Additionally, because of the problem discussed before one could use 2 buffers only which is critical because of the response time issue mentioned above.


Udo Eberhardt
Thesycon GmbH, Germany
xxxxx@thesycon.de
www.thesycon.de

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Deevi, Srinivasa
Sent: Friday, May 10, 2002 9:22 PM
To: NT Developers Interest List
Subject: [ntdev] RE: Problems with USB ISO transfers on XP

HI Udo Eberhardt

if the total no. of frames > 255 , then you will see the below problem I
believe . It is dependent of Pipe MaximumPakcetSize . Let us say Pipe’s
Maximum transfer size is set to 4096 . You need to check the no. of frames
with actual Maximum Packet size first. if it is greater than 255
, then you
need to split the request in multiples of 255 .

NoOfFrames = pIsoOutPipe->MaximumTransferSize /
pIsoOutPipe->MaximumPacketSize;
if(NoOfFrames > 0xff )
NoOfFrames = 0xff;
PresentMaxTransferSize = NoOfFrames *
pDevExt->pIsoOutPipe->MaximumPacketSize;

I hope this helps.

srinivasa

-----Original Message-----
From: Udo Eberhardt [mailto:xxxxx@thesycon.de]
Sent: Friday, May 10, 2002 6:07 AM
To: NT Developers Interest List
Subject: [ntdev] Problems with USB ISO transfers on XP

Hi all,

has anyone else observed the following problem as well?

We are talking about USB 1.1 ISO transfers on Windows XP using an
UHC (Intel
chip set). If the total number of iso frames (the product of
FramesPerBuffer
and NumberOfBuffers) that is used by the USB device driver exceeds some
magic limit then invalid USB traffic is generated by the host controller.
The HC issues two or more IN or OUT tokens per USB frame. This is not
conform with the USB specification which defines exactly one iso token per
frame.

I do not know the exact value of the “magic limit” because it seems to be
different on various machines. I got correct results with 5 buffers and 32
iso frames per buffer for example, but incorrect behavior with 16 buffers.

The problem seems to be caused by bugs in the UHC driver. The problem will
not be solved by the latest updates for XP available at the Microsoft web
site.

Thank you very much for any comments.


Udo Eberhardt
Thesycon GmbH, Germany
xxxxx@thesycon.de
www.thesycon.de


You are currently subscribed to ntdev as: xxxxx@microtune.com
To unsubscribe send a blank email to %%email.unsub%%


You are currently subscribed to ntdev as: xxxxx@thesycon.de
To unsubscribe send a blank email to %%email.unsub%%