mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 14:11:20 +00:00
usb: dwc3: gadget: Don't prepare TRBs if no space
If trbs_left == 0, we don't have any space left in the TRB ring so don't prepare anything. Signed-off-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
This commit is contained in:
parent
0d25744ad1
commit
89bc856e5a
1 changed files with 2 additions and 0 deletions
|
@ -942,6 +942,8 @@ static void dwc3_prepare_trbs(struct dwc3_ep *dep)
|
|||
BUILD_BUG_ON_NOT_POWER_OF_2(DWC3_TRB_NUM);
|
||||
|
||||
trbs_left = dwc3_calc_trbs_left(dep);
|
||||
if (!trbs_left)
|
||||
return;
|
||||
|
||||
list_for_each_entry_safe(req, n, &dep->pending_list, list) {
|
||||
if (req->request.num_mapped_sgs > 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue