Re: USB interrupt endpoint limitations



Thanks for the response Tim.

1) Actually I work on an in house protocol converter that is configurable
between PS2, I2C and SPI that is used for testing prototype touch pads and
similar devices. We have our custom USB driver for it. The converter reports
itself as a proprietary device.

2) I generated timing data with a user mode app that handles interrupt
endpoint traffic from the driver.

3) I've tried to implement multiple pending IRPs in the driver but I'm not
sure I've implemented it correctly. I have introduced an exception during
surprise removal. I didn't write the original driver code and I have limited
driver experience.

To implement the multiple pending IRPs on the interrupt endpoint I simply
allocate multiple IRPs and associated URBs and call IoSetCompletionRoutine()
each one on startup. All IRPs and URBs are stored in the device extension
object.

The completion routine looks for the IRP in the device extension to
determine the URB. Then I process the incoming traffic and call
IoSetCompletionRoutine() on the IRP again.

4) On one computer it did not appear to change my timing results. I plan on
testing again to verify and test on another computer.

5) Question: Is is possible for this completion routine to be call with an
IRP that I did not explicitly create? I suspect not.

JR

"Tim Roberts" wrote:

J.R. Heisey <J.R. Heisey@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

1) The endpoint descriptor has a minimum value of 1 ms polling period.

Therefore it would seem that I can get a maximum of 1000 packets per
second with each packet containing a maximum of 64 bytes of payload
data.

Maximum throughput then limited to 64000 bytes per second.

Anyone disagree with this assessment?

No, assuming you are talking about a full-speed device, you are correct.

2) On some computers it appears that though my USB device requests 1 ms
interrupt endpoint polling the actual polling rate is 2 ms.

What leads you to conclude this? What device class? (Based on your
employer, I'm guessing it's a HID device...) Remember that the host
controller will not ask for data unless there is an outstanding read
request from some driver at the time the frame begins. If you are using a
custom driver, and it only queues one read request at a time, you'd see
this kind of behavior.

Does the behavior correspond to a particular type of host controller? We've
found that some USB host controllers simply suck.
--
Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.

.



Relevant Pages

  • Re: USB interrupt endpoint limitations
    ... convert the driver to KMDF and use the built in KMDF continuous reader on the interrupt endpoint. ... In KMDF how that is done is a little different in that it may set completion routines even when you didn't request one to handle its own bookkeeping tasks, but you should not be called unless you requested that you be called. ... I've tried to implement multiple pending IRPs in the driver but I'm not ...
    (microsoft.public.development.device.drivers)
  • Re: Miniport: DriverObject->DriverUnload should be Chained? or Rep
    ... Basically, your miniport is virtual, so that it does not have underlying ... hardware - the user-mode app plays the role of the hardware. ... your driver has registered with its port/class/library driver is its upper ... communicating with an app via IRPs (apparently, it has a pool of outstanding ...
    (microsoft.public.development.device.drivers)
  • Re: should I queue IRPs in a filter driver
    ... > I have a filter driver layered above the disk class driver. ... > driver filters all IRPs to a particular hard drive. ...
    (microsoft.public.development.device.drivers)
  • Re: when does a PDO become a PDO ?
    ... done for TDI filters I believe) hold all IRPs that come into your driver, ... there are literally hundreds of commercial filter drivers out there and I ... my driver needs to send an IRP to your stack once in a while. ...
    (microsoft.public.development.device.drivers)
  • Re: Miniport: DriverObject->DriverUnload should be Chained? or Rep
    ... once your driver is miniport one that is not supposed to ... hardware - the user-mode app plays the role of the hardware. ... communicating with an app via IRPs (apparently, it has a pool of outstanding ...
    (microsoft.public.development.device.drivers)

Loading