FreeBSD/sys/dev/usb/controller/atmegadci.c
static void
atmegadci_device_done(struct usb_xfer *xfer, usb_error_t error)
{
	struct atmegadci_softc *sc = ATMEGA_BUS2SC(xfer->xroot->bus);
	uint8_t ep_no;

	USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED);

	DPRINTFN(9, "xfer=%p, endpoint=%p, error=%d\n",
	    xfer, xfer->endpoint, error);

	if (xfer->flags_int.usb_mode == USB_MODE_DEVICE) {
		ep_no = (xfer->endpointno & UE_ADDR);

		/* select endpoint number */
		ATMEGA_WRITE_1(sc, ATMEGA_UENUM, ep_no);

		/* disable endpoint interrupt */
		ATMEGA_WRITE_1(sc, ATMEGA_UEIENX, 0);

		DPRINTFN(15, "disabled interrupts!\n");
	}
	/* dequeue transfer and start next transfer */
	usbd_transfer_done(xfer, error);
}
/*------------------------------------------------------------------------*
 *	atmegadci_device_done
 *
 * NOTE: this function can be called more than one time on the
 * same USB transfer!
 *------------------------------------------------------------------------*/
atmegadci_device_done
NOTE: this function can be called more than one time on the
same USB transfer!
atmegadci_device_done NOTE : this function can be called more than one time on the same USB transfer!
static void
atmegadci_device_done(struct usb_xfer *xfer, usb_error_t error)
{
	struct atmegadci_softc *sc = ATMEGA_BUS2SC(xfer->xroot->bus);
	uint8_t ep_no;
	USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED);
	DPRINTFN(9, "xfer=%p, endpoint=%p, error=%d\n",
	    xfer, xfer->endpoint, error);
	if (xfer->flags_int.usb_mode == USB_MODE_DEVICE) {
		ep_no = (xfer->endpointno & UE_ADDR);
		ATMEGA_WRITE_1(sc, ATMEGA_UENUM, ep_no);
		ATMEGA_WRITE_1(sc, ATMEGA_UEIENX, 0);
		DPRINTFN(15, "disabled interrupts!\n");
	}
	usbd_transfer_done(xfer, error);
}
static void atmegadci_device_done ( struct usb_xfer * xfer , usb_error_t error ) { struct atmegadci_softc * sc = ATMEGA_BUS2SC ( xfer -> xroot -> bus ) ; uint8_t ep_no ; USB_BUS_LOCK_ASSERT ( & sc -> sc_bus , MA_OWNED ) ; DPRINTFN ( 9 , " \n " , xfer , xfer -> endpoint , error ) ; if ( xfer -> flags_int . usb_mode == USB_MODE_DEVICE ) { ep_no = ( xfer -> endpointno & UE_ADDR ) ; ATMEGA_WRITE_1 ( sc , ATMEGA_UENUM , ep_no ) ; ATMEGA_WRITE_1 ( sc , ATMEGA_UEIENX , 0 ) ; DPRINTFN ( 15 , " \n " ) ; } usbd_transfer_done ( xfer , error ) ; }
atmegadci_device_done
 NOTE: this function can be called more than one time on the
 same USB transfer!
atmegadci_device_done NOTE : this function can be called more than one time on the same USB transfer!
/* select endpoint number */ /* disable endpoint interrupt */ /* dequeue transfer and start next transfer */