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:

> USB device is:
> 
> T:  Bus=02 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#=  5 Spd=12  MxCh= 0
> D:  Ver= 2.00 Cls=fe(app. ) Sub=01 Prot=00 MxPS=64 #Cfgs=  1
> P:  Vendor=1e96 ProdID=ffff Rev=53.63
> C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  0mA
> I:* If#= 0 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=00 Driver=(none)
> 
> 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.

>  Can it be because of data are
> transfered between host and interface (not endpoint)?

That question is meaningless.  All transfers are made to endpoints.

> My device does not work if I transfer data faster than 64bytes/ms. I
> sniff Windows and MacOSX:
> - MacOSX trasnfers data faster and device does not work
> - Windows transfers data at 64b/ms speed and device works ok.
> 
> (device does not work means device is disconnected after small amount
> of data transfered with -ETIMEDOUT, -ENXIO or some other error)

Can you post traces showing the device working under Windows and 
failing under Linux?

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