Re: How can I limit full speed transfer to 64 bytes per ms?

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

 



On Mon, 13 Dec 2010, Sergej Pupykin wrote:

> At Mon, 13 Dec 2010 12:21:43 -0500 (EST),
> Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
> > > According to USB sniffer it transfers data much faster than 64byte
> > > packet per ms. How can I limit it?
> >
> > Does this listing show the device's state after the firmware has been
> > loaded?  The only endpoint it shows is the default control endpoint
> > (endpoint 0).  You cannot limit the transfer rate for control
> > transfers(*), but you can limit the rate for other types of transfer.
> >
> > (*) This isn't entirely true.  If you are using uhci-hcd then control
> > transfers are limited to one packet (64 bytes for your device) per ms
> > whenever the device is unconfigured.  Your program should avoid sending
> > a Set-Configuration request.  But with ohci-hcd there is no way to
> > affect the transfer rate; it is handled entirely by the hardware.

...

> It was the same machine (toshiba laptop with uhci controller)

You should change your program to install configuration 0 (i.e., 
unconfigure the device) before carrying out the data transfer.  That 
will limit the transfer rate to one transaction per ms -- provided you 
continue to use a UHCI controller.

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


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

  Powered by Linux