AW: USB interrupt routine never gets called.

Hi,

Thank you for the fast answer. I did some more testing with the device and got this behavior:

EP-Size TransferB DataSize Segmentation Result
(Byte) (Byte)

64 0x4000 0x4000 256x64B Interrupt returns
64 0x4000 0x3FFF 255x64B + 1x1B Interrupt returns
64 0x4000 0x501 20x64B + 1x1B NO Interrupt
64 0x4000 0x500 20x64B + ZLP NO Interrupt

64 0x1000 0x501 20x64B + 1x1B Interrupt returns
64 0x1001 0x501 20x64B + 1x1B NO Interrupt

I tested both cases with and without the flag USBD_SHORT_TRANSFER_OK. Anyway shouldn’t in the case of a error the host-controller return with a
error-code?
If I can trust my hardware USB analyzer the segmentation packets are correct.

Best regards
Emanuel Eick

-----Urspr?ngliche Nachricht-----
Von: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] Im Auftrag von Doron Holan
Gesendet: Dienstag, 4. M?rz 2008 18:19
An: Windows System Software Devs Interest List
Betreff: RE: [ntdev] USB interrupt routine never gets called.

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


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

Eick, Emanuel wrote:

Hi,

Thank you for the fast answer. I did some more testing with the device and got this behavior:

EP-Size TransferB DataSize Segmentation Result
(Byte) (Byte)

64 0x4000 0x4000 256x64B Interrupt returns
64 0x4000 0x3FFF 255x64B + 1x1B Interrupt returns
64 0x4000 0x501 20x64B + 1x1B NO Interrupt
64 0x4000 0x500 20x64B + ZLP NO Interrupt

64 0x1000 0x501 20x64B + 1x1B Interrupt returns
64 0x1001 0x501 20x64B + 1x1B NO Interrupt

I tested both cases with and without the flag USBD_SHORT_TRANSFER_OK. Anyway shouldn’t in the case of a error the host-controller return with a error-code?

Yes. Your first transfer wouldn’t be an error, but the others would.

If I can trust my hardware USB analyzer the segmentation packets are correct.

When you say “NO Interrupt”, do you mean that your completion routine is
not called? The IRP just hangs forever? Can you post the code that
prepares and submits the URB, and the completion routine? I’ve done
this kind of thing a million times. I know it works.


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