commit | e9b9fc1bc0d512446935ed88703230b93e7dcd82 | [log] [tgz] |
---|---|---|
author | Ikjoon Jang <ikjn@chromium.org> | Mon Aug 09 08:59:29 2021 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Aug 19 10:28:04 2021 |
tree | 34ebc65c61bd78fd1b513d9d2b26da6a649d51b0 | |
parent | a01e663004a00bf018c4fb110286630f53e0262f [diff] |
FROMLIST: usb: xhci-mtk: handle bandwidth table rollover xhci-mtk has 64 slots for periodic bandwidth calculations and each slot represents byte budgets on a microframe. When an endpoint's allocation sits on the boundary of the table, byte budgets' slot should be rolled over but the current implementation doesn't. This patch applies a 6 bits mask to the microframe index to handle its rollover 64 slots and prevent out-of-bounds array access. Signed-off-by: Ikjoon Jang <ikjn@chromium.org> (am from https://patchwork.kernel.org/patch/12425871/) (also found at https://lore.kernel.org/r/20210809165904.RFC.1.I5165a4a8da5cac23c9928b1ec3c3a1a7383b7c23@changeid) BUG=b:190087110, b:194321800 TEST=testing FS audio headsets in meet [Regenerated the Change-Id, original CL: https://crrev.com/c/3103033] Change-Id: I99617651972c3dc62829515ff22ce973d828a191 Signed-off-by: Tzung-Bi Shih <tzungbi@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/3106718 Reviewed-by: Sean Paul <seanpaul@chromium.org> Reviewed-by: Ikjoon Jang <ikjn@chromium.org> Commit-Queue: Ikjoon Jang <ikjn@chromium.org>