summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/check-perf-trace.py
diff options
context:
space:
mode:
authorJohn Youn <johnyoun@synopsys.com>2016-05-20 03:26:12 +0300
committerFelipe Balbi <felipe.balbi@linux.intel.com>2016-06-20 12:32:44 +0300
commit32db3d9437b6bd560daeef82a8325436a4ac3366 (patch)
tree6ca6932e39750d5de1f013cef4904c25b290b40f /tools/perf/scripts/python/check-perf-trace.py
parent89bc856e5a7462e47d90d5a3f5396bd5795efd0c (diff)
downloadlinux-32db3d9437b6bd560daeef82a8325436a4ac3366.tar.xz
usb: dwc3: gadget: Account for max size in TRB space
The current calculation takes dep->trb_dequeue - dep->trb_enqueue to find the TRB space left. If you enqueue 1, that results in: (u8) 0 - (u8) 1 = 0xff = 255 TRBs left. This is correct if DWC3_TRB_NUM == 256. If DWC3_TRB_NUM is less than 256 (but still a power of 2) you need to mod the result by DWC3_TRB_NUM. For example the same calculation with DWC3_TRB_NUM = 8, results in: 255 % 6 = 7 TRBs left. Signed-off-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'tools/perf/scripts/python/check-perf-trace.py')
0 files changed, 0 insertions, 0 deletions