+}
+
+static int usbhsg_try_run_send_packet(struct usbhsg_uep *uep,
+ struct usbhsg_request *ureq)
+{
+ struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep);
+ struct usb_request *req = &ureq->req;
+ struct usbhs_pkt *pkt = usbhsg_ureq_to_pkt(ureq);
+ int ret;
+
+ /*
+ ********* assume under spin lock *********
+ */
+
+ usbhs_pkt_update(pkt, pipe,
+ req->buf + req->actual,
+ req->length - req->actual);
+
+ ret = usbhs_fifo_write(pkt);
+ if (ret < 0) {
+ /* pipe is busy.
+ * retry in interrupt */
+ uep->handler->irq_mask(uep, 1);
+ }