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

Commit 594e121f authored by Felipe Balbi's avatar Felipe Balbi
Browse files

usb: dwc3: gadget: stop kicking if we run out of space



In case our TRB ring is full, we can avoid trying to
kick transfers which won't start and just add requests
to the queue.

Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent 7ae7df49
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -1082,6 +1082,9 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req)
		return 0;
		return 0;
	}
	}


	if (!dwc3_calc_trbs_left(dep))
		return 0;

	ret = __dwc3_gadget_kick_transfer(dep, 0);
	ret = __dwc3_gadget_kick_transfer(dep, 0);
	if (ret && ret != -EBUSY)
	if (ret && ret != -EBUSY)
		dwc3_trace(trace_dwc3_gadget,
		dwc3_trace(trace_dwc3_gadget,