Re: About zero-length packet design for EHCI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've got a question regarding ISO transfer. If the firmware is not providing data is the ISO urb returning zero packet length and if yes how can I check that in the driver? I'm working on a solution for my USBDUX driver where the ADC for example takes 800us to measure all data so that a couple of zero length packets were generated until new data has been created.

/Bernd

Alan Stern wrote:
On Fri, 3 Jul 2015, Peter Chen wrote:

Thanks, I think I understand it now.

Maybe only the case A like below commit needs zero-length packet.

usb: chipidea: udc: Disable auto ZLP generation on ep0
953c66469735aed8d2ada639a72b150f01dae605

Case A (as described in that commit) definitely needs a ZLP. The packet could be generated by the software or by the hardware. But not by both -- then there would be two ZLPs!

Here is a simplified answer. If a transfer requires more than one qTD, then all the qTDs but the last one will have their Alternate Next qTD Pointers set to a special value. The last qTD doesn't need this.

Since ehci-hcd never uses more than one qTD for a control transfer data
stage, the issue doesn't comes up.  But if you look at how ehci-hcd
handles large bulk transfers, you will see what I mean.
The case A I list above, it should uses more than one qTD, right?

In case A, wLength is 255 bytes. That easily fits into one qTD. In fact, an EHCI qTD can handle up to 20 KB.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
http://www.berndporr.me.uk
http://www.imdb.com/name/nm3293421/
http://www.facebook.com/bernd.porr
+44 (0)7840 340069
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux