/* Returns 1 if request fully written, 0 if request only partially sent  */
static int write_ep0_fifo(struct pxa_ep *ep, struct pxa27x_request *req)
/* Returns 1 if request fully written, 0 if request only partially sent  */
static int write_ep0_fifo(struct pxa_ep *ep, struct pxa27x_request *req)
{
	unsigned	count;
	int		is_last, is_short;
	count = write_packet(ep, req, EP0_FIFO_SIZE);
	inc_ep_stats_bytes(ep, count, USB_DIR_IN);
	is_short = (count < EP0_FIFO_SIZE);
	is_last = ((count == 0) || (count < EP0_FIFO_SIZE));
	if (unlikely(is_short))
		ep_write_UDCCSR(ep, UDCCSR0_IPR);
	ep_dbg(ep, "in %d bytes%s%s, %d left, req=%p, udccsr0=0x%03x\n",
		count, is_short ? "/S" : "", is_last ? "/L" : "",
		req->req.length - req->req.actual,
		&req->req, udc_ep_readl(ep, UDCCSR));
	return is_last;
}