FreeBSD/sys/dev/usb/controller/musb_otg.c
/*------------------------------------------------------------------------*
 *	musbotg_device_done
 *
 * NOTE: this function can be called more than one time on the
 * same USB transfer!
 *------------------------------------------------------------------------*/
musbotg_device_done
NOTE: this function can be called more than one time on the
same USB transfer!
musbotg_device_done NOTE : this function can be called more than one time on the same USB transfer!
static void
musbotg_device_done(struct usb_xfer *xfer, usb_error_t error)
{
	struct musbotg_td *td;
	struct musbotg_softc *sc;
	USB_BUS_LOCK_ASSERT(xfer->xroot->bus, MA_OWNED);
	DPRINTFN(1, "xfer=%p, endpoint=%p, error=%d\n",
	    xfer, xfer->endpoint, error);
	DPRINTFN(14, "disabled interrupts on endpoint\n");
	sc = MUSBOTG_BUS2SC(xfer->xroot->bus);
	td = xfer->td_transfer_cache;
	if (td && (td->channel != -1))
		musbotg_channel_free(sc, td);
	usbd_transfer_done(xfer, error);
}
static void musbotg_device_done ( struct usb_xfer * xfer , usb_error_t error ) { struct musbotg_td * td ; struct musbotg_softc * sc ; USB_BUS_LOCK_ASSERT ( xfer -> xroot -> bus , MA_OWNED ) ; DPRINTFN ( 1 , " \n " , xfer , xfer -> endpoint , error ) ; DPRINTFN ( 14 , " \n " ) ; sc = MUSBOTG_BUS2SC ( xfer -> xroot -> bus ) ; td = xfer -> td_transfer_cache ; if ( td && ( td -> channel != -1 ) ) musbotg_channel_free ( sc , td ) ; usbd_transfer_done ( xfer , error ) ; }
musbotg_device_done
 NOTE: this function can be called more than one time on the
 same USB transfer!
musbotg_device_done NOTE : this function can be called more than one time on the same USB transfer!
/* dequeue transfer and start next transfer */