USB interrupt routine never gets called.

Hello,

I am working on an USB-driver for a device which has two interrupt pipes.
The pipes have the following setup:
| EP1 | EP2
--------------±------±-------
PacketSize | 1024 | 64
Direction | IN | IN

I register my interrupt callbacks like this:

  1. UsbBuildInterruptOrBulkTransferRequest( … );
  2. IoSetCompletionRoutine( … );
  3. get the nextIrp by calling IoGetNextIrpStackLocation() and alter the IoControlCode
  4. IoCallDriver();

This works quite well as long as I keep the TransferBufferLength specified in
UsbBuildInterruptOrBulkTransferRequest() smaller than 4K for EP2 and 8K for EP1.
Otherwise my interrupt routine never gets triggered. The device returns the data
correctly, but somehow the host-controller never returns my IRP.
Considering USBD_PIPE_INFORMATION from the msdn the maximum size should be “theoretically unlimited”.

I am using Windows XP/SP2 and the latest wdk. So MaximumTransferSize from USBD_PIPE_INFORMATION shouldn’t be a reason.

Does anyone has an idea?

Best regards
Emanuel Eick

Are you specifying USBD_SHORT_TRANSFER_OK in your URB? Is your device transferring a packet that is a multiple of max packet size?

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@siemens.com
Sent: Tuesday, March 04, 2008 8:20 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] USB interrupt routine never gets called.

Hello,

I am working on an USB-driver for a device which has two interrupt pipes.
The pipes have the following setup:
| EP1 | EP2
--------------±------±-------
PacketSize | 1024 | 64
Direction | IN | IN

I register my interrupt callbacks like this:

  1. UsbBuildInterruptOrBulkTransferRequest( … );
  2. IoSetCompletionRoutine( … );
  3. get the nextIrp by calling IoGetNextIrpStackLocation() and alter the IoControlCode
  4. IoCallDriver();

This works quite well as long as I keep the TransferBufferLength specified in
UsbBuildInterruptOrBulkTransferRequest() smaller than 4K for EP2 and 8K for EP1.
Otherwise my interrupt routine never gets triggered. The device returns the data
correctly, but somehow the host-controller never returns my IRP.
Considering USBD_PIPE_INFORMATION from the msdn the maximum size should be “theoretically unlimited”.

I am using Windows XP/SP2 and the latest wdk. So MaximumTransferSize from USBD_PIPE_INFORMATION shouldn’t be a reason.

Does anyone has an idea?

Best regards
Emanuel Eick


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