ZLP on USB Interrupt OUT endpoint

Hi,

Is it possible to do a zero length packet on an OUT interrupt endpoint?

I am pretty sure i can do it(ZLP) on Bulk IN/OUT and Interrupt IN endpoints.

When i tried to do the ZLP on Interrupt OUT endpoint, the system crashed restarted .

The crash code, D1 showed that an invalid/paged memory is accessed and the bug analysys showed the error is with usbehci.sys.

Is there any limitation on usbehci.sys like this?

regards,
Nisheedh

Nisheedh, we’ve been down this road before - you have to give us something to work with in order for
us to help you. Please post the !analyze /v.

I don’t anything about USB, but I know that we’ll need the !analyze to do anything.

mm

xxxxx@yahoo.co.in wrote:

Hi,

Is it possible to do a zero length packet on an OUT interrupt endpoint?

I am pretty sure i can do it(ZLP) on Bulk IN/OUT and Interrupt IN endpoints.

When i tried to do the ZLP on Interrupt OUT endpoint, the system crashed restarted .

The crash code, D1 showed that an invalid/paged memory is accessed and the bug analysys showed the error is with usbehci.sys.

Is there any limitation on usbehci.sys like this?

regards,
Nisheedh

As MM said, please post the output of WinDbg !analyze -v… with the correct symbols please.

But, a larger question: What do you expect a zero length OUT on an Interrupt Endpoint to DO? Why would you send this from your driver?

Sure… it shouldn’t blue screen the EHCI driver. But, aside from being completed (either successfully or not) isn’t it an error for your driver to send such a packet?

In other words, as I often ask… what are you trying to accomplish?

Peter
OSR

Peter Viscarola (OSR) wrote:

Sure… it shouldn’t blue screen the EHCI driver. But, aside from
being completed (either successfully or not) isn’t it an error for
your driver to send such a packet?

Not at all. Zero-length packets are completely valid to send from both the device and host. They’re typically used to signal the end of a “transfer” whose size is an exact multiple of the pipe’s maximum packet size.

Well, thank you Chris. Now that I think about it, that makes perfect sense. I guess I never thought of them being sent down from the “higher level” driver, but why should that not be possible? Thanks!

Peter
OSR

Peter Viscarola (OSR) wrote:

I guess I never thought of them being sent down from the
“higher level” driver, but why should that not be possible?

I’m not sure if this what you mean, but as far as I know, a ZLP will never be sent by anyone except the participants in the function driver stack. That is, usbhub, the port drivers, and so on will not send one on your behalf (how would they know when it would be correct to do so?)

Now I’m not sure what YOU mean :slight_smile:

OK… Obviously.

My point, which wasn’t important in any case, is that one sets-up zero-length data packets frequently at the HCD as a Transactional “ACK” – For example, the OUT Transaction that’s part of a GetDescriptor Transfer.

I had just never considered a client driver using this capability to indicate something like data block termination to the device firmware.

Peter
OSR

xxxxx@osr.com wrote:

My point, which wasn’t important in any case, is that one sets-up zero-length data packets frequently at the HCD as a Transactional “ACK” – For example, the OUT Transaction that’s part of a GetDescriptor Transfer.

I had just never considered a client driver using this capability to indicate something like data block termination to the device firmware.

It’s an interesting philosophical problem. With bulk pipes, we tend to
think of sending big data blocks, which happen to be split into
packet-sized chunks. If you send a 512,001-byte block, the last packet
only has 1 byte, and the device knows you’re done. If you send a
512,000-byte block, there has to be a way to say “whoops, that’s all”.
Hence, the ZLP.

If I may put on my overgeneralization hat, interrupt pipes usually don’t
have that “big block” mentality. Usually, interrupt pipe transfers have
one piece of information per packet, repeated periodically. Otherwise,
you don’t really need an interrupt pipe. As long as each packet stands
alone, you don’t need the ZLP concept. Even if the packet is full, you
know the “transaction” is done.

This issue (ZLP out on an interrupt pipe hangs) has been reported
previously on this forum. I do not think there was a resolution.


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

Can anyone try a ZLP(Zero length packet) on Interrupt OUT endpoint?

I would like to get information on whether my issue is with my USB driver or is it due to usbehci.sys.

I have used Windows XP -x86 sp2.

Regards
Nisheedh