FreeBSD/sys/dev/usb/usb_busdma.c
/*------------------------------------------------------------------------*
 *	usb_bdma_pre_sync
 *
 * This function handles DMA synchronisation that must be done before
 * an USB transfer is started.
 *------------------------------------------------------------------------*/
usb_bdma_pre_sync
This function handles DMA synchronisation that must be done before
an USB transfer is started.
usb_bdma_pre_sync This function handles DMA synchronisation that must be done before an USB transfer is started .
void
usb_bdma_pre_sync(struct usb_xfer *xfer)
{
	struct usb_page_cache *pc;
	usb_frcount_t nframes;
	if (xfer->flags_int.isochronous_xfr) {
		nframes = 1;
	} else {
		nframes = xfer->nframes;
	}
	pc = xfer->frbuffers;
	while (nframes--) {
		if (pc->isread) {
			usb_pc_cpu_invalidate(pc);
		} else {
			usb_pc_cpu_flush(pc);
		}
		pc++;
	}
}
void usb_bdma_pre_sync ( struct usb_xfer * xfer ) { struct usb_page_cache * pc ; usb_frcount_t nframes ; if ( xfer -> flags_int . isochronous_xfr ) { nframes = 1 ; } else { nframes = xfer -> nframes ; } pc = xfer -> frbuffers ; while ( nframes -- ) { if ( pc -> isread ) { usb_pc_cpu_invalidate ( pc ) ; } else { usb_pc_cpu_flush ( pc ) ; } pc ++ ; } }
usb_bdma_pre_sync
 This function handles DMA synchronisation that must be done before
 an USB transfer is started.
usb_bdma_pre_sync This function handles DMA synchronisation that must be done before an USB transfer is started .
/* only one frame buffer */ /* can be multiple frame buffers */