FreeBSD/sys/x86/x86/busdma_bounce.c
/*
 * Destroy a handle for mapping from kva/uva/physical
 * address space into bus device space.
 */
Destroy a handle for mapping from kva/uva/physical
address space into bus device space.
Destroy a handle for mapping from kva / uva / physical address space into bus device space .
static int
bounce_bus_dmamap_destroy(bus_dma_tag_t dmat, bus_dmamap_t map)
{
	if (map != NULL && map != &nobounce_dmamap) {
		if (STAILQ_FIRST(&map->bpages) != NULL) {
			CTR3(KTR_BUSDMA, "%s: tag %p error %d",
			    __func__, dmat, EBUSY);
			return (EBUSY);
		}
		if (dmat->bounce_zone)
			dmat->bounce_zone->map_count--;
		free(map, M_DEVBUF);
	}
	dmat->map_count--;
	CTR2(KTR_BUSDMA, "%s: tag %p error 0", __func__, dmat);
	return (0);
}
static int bounce_bus_dmamap_destroy ( bus_dma_tag_t dmat , bus_dmamap_t map ) { if ( map != NULL && map != & nobounce_dmamap ) { if ( STAILQ_FIRST ( & map -> bpages ) != NULL ) { CTR3 ( KTR_BUSDMA , " " , __func__ , dmat , EBUSY ) ; return ( EBUSY ) ; } if ( dmat -> bounce_zone ) dmat -> bounce_zone -> map_count -- ; free ( map , M_DEVBUF ) ; } dmat -> map_count -- ; CTR2 ( KTR_BUSDMA , " " , __func__ , dmat ) ; return ( 0 ) ; }
Destroy a handle for mapping from kva/uva/physical
 address space into bus device space.
Destroy a handle for mapping from kva / uva / physical address space into bus device space .