/* Returns 1 if the request completed, 0 otherwise  */
static int read_fifo(struct pxa_ep *ep, struct pxa27x_request *req)
/* Returns 1 if the request completed, 0 otherwise  */
static int read_fifo(struct pxa_ep *ep, struct pxa27x_request *req)
{
	int count, is_short, completed = 0;
	while (epout_has_pkt(ep)) {
		count = read_packet(ep, req);
		inc_ep_stats_bytes(ep, count, !USB_DIR_IN);
		is_short = (count < ep->fifo_size);
		ep_dbg(ep, "read udccsr:%03x, count:%d bytes%s req %p %d/%d\n",
			udc_ep_readl(ep, UDCCSR), count, is_short ? "/S" : "",
			&req->req, req->req.actual, req->req.length);
		if (is_short || req->req.actual == req->req.length) {
			completed = 1;
			break;
		}
	}
	return completed;
}