FreeBSD/sys/dev/usb/usb_busdma.c
/*------------------------------------------------------------------------*
 *	usb_dma_tag_create - allocate a DMA tag
 *
 * NOTE: If the "align" parameter has a value of 1 the DMA-tag will
 * allow multi-segment mappings. Else all mappings are single-segment.
 *------------------------------------------------------------------------*/
allocate a DMA tag
NOTE: If the "align" parameter has a value of 1 the DMA-tag will
allow multi-segment mappings. Else all mappings are single-segment.
allocate a DMA tag NOTE : If the " align " parameter has a value of 1 the DMA - tag will allow multi - segment mappings . Else all mappings are single - segment .
static void
usb_dma_tag_create(struct usb_dma_tag *udt,
    usb_size_t size, usb_size_t align)
{
	bus_dma_tag_t tag;
	if (bus_dma_tag_create
	    (  udt->tag_parent->tag,
	      align,
	      0,
	      (2ULL << (udt->tag_parent->dma_bits - 1)) - 1,
	      BUS_SPACE_MAXADDR,
	      NULL,
	      NULL,
	      size,
	      (align == 1 && size > 1) ?
	    (2 + (size / USB_PAGE_SIZE)) : 1,
	      (align == 1 && size > USB_PAGE_SIZE) ?
	    USB_PAGE_SIZE : size,
	      BUS_DMA_KEEP_PG_OFFSET,
	      &usb_dma_lock_cb,
	      NULL,
	    &tag)) {
		tag = NULL;
	}
	udt->tag = tag;
}
static void usb_dma_tag_create ( struct usb_dma_tag * udt , usb_size_t size , usb_size_t align ) { bus_dma_tag_t tag ; if ( bus_dma_tag_create ( udt -> tag_parent -> tag , align , 0 , ( 2ULL << ( udt -> tag_parent -> dma_bits - 1 ) ) - 1 , BUS_SPACE_MAXADDR , NULL , NULL , size , ( align == 1 && size > 1 ) ? ( 2 + ( size / USB_PAGE_SIZE ) ) : 1 , ( align == 1 && size > USB_PAGE_SIZE ) ? USB_PAGE_SIZE : size , BUS_DMA_KEEP_PG_OFFSET , & usb_dma_lock_cb , NULL , & tag ) ) { tag = NULL ; } udt -> tag = tag ; }
usb_dma_tag_create - allocate a DMA tag
 NOTE: If the "align" parameter has a value of 1 the DMA-tag will
 allow multi-segment mappings.
usb_dma_tag_create - allocate a DMA tag NOTE : If the " align " parameter has a value of 1 the DMA - tag will allow multi - segment mappings .
/* parent    */ /* alignment */ /* boundary  */ /* lowaddr   */ /* highaddr  */ /* filter    */ /* filterarg */ /* maxsize   */ /* nsegments */ /* maxsegsz  */ /* flags     */ /* lockfn    */ /* lockarg   */