FreeBSD/sys/mips/mips/busdma_machdep.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 .
int
bus_dmamap_destroy(bus_dma_tag_t dmat, bus_dmamap_t map)
{
	if (STAILQ_FIRST(&map->bpages) != NULL || map->sync_count != 0) {
		CTR3(KTR_BUSDMA, "%s: tag %p error %d",
		    __func__, dmat, EBUSY);
		return (EBUSY);
	}
	if (dmat->bounce_zone)
		dmat->bounce_zone->map_count--;
	_busdma_free_dmamap(map);
	CTR2(KTR_BUSDMA, "%s: tag %p error 0", __func__, dmat);
        return (0);
}
int bus_dmamap_destroy ( bus_dma_tag_t dmat , bus_dmamap_t map ) { if ( STAILQ_FIRST ( & map -> bpages ) != NULL || map -> sync_count != 0 ) { CTR3 ( KTR_BUSDMA , " " , __func__ , dmat , EBUSY ) ; return ( EBUSY ) ; } if ( dmat -> bounce_zone ) dmat -> bounce_zone -> map_count -- ; _busdma_free_dmamap ( map ) ; 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 .