Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit d9d60cd6 authored by Alan Stern's avatar Alan Stern Committed by Greg Kroah-Hartman
Browse files

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



(Upstream commit ffc4ea79bc06f42283da10ea06bb17b9a3e2b2b4.)

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>
Signed-off-by: default avatarAndrey Konovalov <andreyknvl@google.com>
Bug: 147413187
Change-Id: Ib3bbaf9868a76dba2795042abb0f063099f9fc98
parent ca968982
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment