Skip to content
Commit ffc4ea79 authored by Alan Stern's avatar Alan Stern Committed by Felipe Balbi
Browse files

USB: dummy-hcd: bandwidth limits for non-bulk transfers



Part of the emulation performed by dummy-hcd is accounting for
bandwidth utilization.  The total amount of data transferred in a
single frame is supposed to be no larger than an actual USB connection
could accommodate.

Currently the driver performs bandwidth limiting only for bulk
transfers; control and periodic transfers are effectively unlimited.
(Presumably drivers were not expected to request extremely large
control or interrupt transfers.)  This patch improves the situation
somewhat by restricting them as well.

The emulation still isn't perfect.  On a real system, even 0-length
transfers use some bandwidth because of transaction overhead
(IN, OUT, ACK, NACK packets) and packet overhead (SYNC, PID, bit
stuffing, CRC, EOP).  Adding in those factors is left as an exercise
for a later patch.

Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent 8a5776a5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment