FreeBSD/sys/dev/usb/controller/dwc_otg.c
/*------------------------------------------------------------------------*
 *	dwc_otg_device_done
 *
 * NOTE: this function can be called more than one time on the
 * same USB transfer!
 *------------------------------------------------------------------------*/
dwc_otg_device_done
NOTE: this function can be called more than one time on the
same USB transfer!
dwc_otg_device_done NOTE : this function can be called more than one time on the same USB transfer!
static void
dwc_otg_device_done(struct usb_xfer *xfer, usb_error_t error)
{
	struct dwc_otg_softc *sc = DWC_OTG_BUS2SC(xfer->xroot->bus);
	DPRINTFN(9, "xfer=%p, endpoint=%p, error=%d\n",
	    xfer, xfer->endpoint, error);
	USB_BUS_SPIN_LOCK(&sc->sc_bus);
	if (xfer->flags_int.usb_mode == USB_MODE_DEVICE) {
	} else {
		struct dwc_otg_td *td;
		td = xfer->td_transfer_cache;
 		if (td != NULL)
			dwc_otg_host_channel_free(sc, td);
	}
	usbd_transfer_done(xfer, error);
	USB_BUS_SPIN_UNLOCK(&sc->sc_bus);
}
static void dwc_otg_device_done ( struct usb_xfer * xfer , usb_error_t error ) { struct dwc_otg_softc * sc = DWC_OTG_BUS2SC ( xfer -> xroot -> bus ) ; DPRINTFN ( 9 , " \n " , xfer , xfer -> endpoint , error ) ; USB_BUS_SPIN_LOCK ( & sc -> sc_bus ) ; if ( xfer -> flags_int . usb_mode == USB_MODE_DEVICE ) { } else { struct dwc_otg_td * td ; td = xfer -> td_transfer_cache ; if ( td != NULL ) dwc_otg_host_channel_free ( sc , td ) ; } usbd_transfer_done ( xfer , error ) ; USB_BUS_SPIN_UNLOCK ( & sc -> sc_bus ) ; }
dwc_otg_device_done
 NOTE: this function can be called more than one time on the
 same USB transfer!
dwc_otg_device_done NOTE : this function can be called more than one time on the same USB transfer!
/* Interrupts are cleared by the interrupt handler */ /* dequeue transfer and start next transfer */