Re: USB Interrupt Transfer limited to 1 packet?
[email protected] (Florin Iucha)
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Feb 01, 2007 at 11:19:43AM -0500, Alan Stern wrote:
> > My device has an interrupt endpoint that
> > delivers 122 bytes every 10 ms. I have written a simple program that
> > uses libusb to read the data, and it produces two interrupts for each
> > 122-byte packet (as observed by looking at /proc/interrupts).
>
> I don't know why there are two interrupts; there should only be one.
> Still, an average of 200 interrupts per second isn't excessively high.
There is quite a bit of CPU work in analyzing that data in real-time
and displaying it, so we are trying to optimize all we can.
> > Looking at the code, it seems that the interrupt transfers are limited
> > to 1 packet? There is a comment to that effect at line 1470 in
> > drivers/usb/usb-uhci.c (function is uhci_submit_int_urb):
> >
> > // INT allows only one packet
> > if (urb->transfer_buffer_length > usb_maxpacket (urb->dev, pipe, usb_pipeout (pipe)))
> > return -EINVAL;
> >
> > The same text is present in linux-2.4.34 as well.
> >
> > Code to the same effect is present also in uhci.c (function
> > uhci_submit_interrupt) but without the comment.
> >
> > I have tried to find the same check in the linux-2.6.20-rcX but could
> > not find it.
>
> Because it isn't there. That limitation has been removed in 2.6.
Good!
> > I have read the Intel 82801E manual (this is the chipset that I am
> > using) and the USB 2.0 spec (section 8.5.4 in particular, in contrast
> > to 8.5.2) but I did not find a hard reference to this limitation of a
> > single data packet per interrupt transfer. Do you have a hard
> > reference to this limitation and can you send me a link or a
> > document/section number?
>
> It isn't a hardware limitation; it's a software driver limitation. So you
> won't find it in any hardware manuals.
Does that mean that I can just remove the check and everything should
work? Do you know if there is anything that assumes the check
upstream and might break if removed? I will certainly try it on my
end and report my findings.
Thank you,
florin
--
Bruce Schneier expects the Spanish Inquisition.
http://geekz.co.uk/schneierfacts/fact/163
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFFwhoWND0rFCN2b1sRAoZeAJ9Xkyb+ZJf0SCRHUJiSD1hF93//mgCcDe+4 GJBsjO+gdrlyufRelejAyUo= =VIWR -----END PGP SIGNATURE-----