/* Returns return ENOMEM if transfer ring i not enough TRBs to start all requests.  */
static int cdns3_start_all_request(struct cdns3_device *priv_dev, struct cdns3_endpoint *priv_ep)
/* Returns return ENOMEM if transfer ring i not enough TRBs to start all requests.  */
static int cdns3_start_all_request(struct cdns3_device *priv_dev, struct cdns3_endpoint *priv_ep)
{
	struct usb_request *request;
	int ret = 0;
	while (!list_empty(&priv_ep->deferred_req_list)) {
		request = cdns3_next_request(&priv_ep->deferred_req_list);
		ret = cdns3_ep_run_transfer(priv_ep, request);
		if (ret)
			return ret;
		list_del(&request->list);
		list_add_tail(&request->list,
			      &priv_ep->pending_req_list);
	}
	priv_ep->flags &= ~EP_RING_FULL;
	return ret;
}