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

Skip to content
Commit da1bbe69 authored by Ajay Agarwal's avatar Ajay Agarwal
Browse files

usb: dwc3: gadget: Fix TRB pointer increment logic



Currently the driver assumes that the number of TRBs per EP would
be 256 (DWC3_TRB_NUM) and accordingly goes back to 0th TRB if
pointer reaches 255th index (link TRB). But the GSI EPs can have
lesser number of TRBs, say 16. And if it uses SW interrupt, then
the TRB pointer increment logic fails because TRB from index 16
to 254 is invalid.
Fix this by checking index against dep->num_trbs which is
programmed separately for normal and GSI EPs.

Change-Id: Ida5745c2d7d0564507333c5b38d728090e70fcf6
Signed-off-by: default avatarAjay Agarwal <ajaya@codeaurora.org>
parent 8e57beea
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