Lines Matching refs:sg_map
197 struct sg_map_node *sg_map; in aha_free() local
199 while ((sg_map = SLIST_FIRST(&aha->sg_maps))!= NULL) { in aha_free()
201 bus_dmamap_unload(aha->sg_dmat, sg_map->sg_dmamap); in aha_free()
202 bus_dmamem_free(aha->sg_dmat, sg_map->sg_vaddr, in aha_free()
203 sg_map->sg_dmamap); in aha_free()
204 free(sg_map, M_DEVBUF); in aha_free()
632 struct sg_map_node *sg_map; in ahaallocccbs() local
640 sg_map = malloc(sizeof(*sg_map), M_DEVBUF, M_NOWAIT); in ahaallocccbs()
642 if (sg_map == NULL) in ahaallocccbs()
646 if (bus_dmamem_alloc(aha->sg_dmat, (void **)&sg_map->sg_vaddr, in ahaallocccbs()
647 BUS_DMA_NOWAIT, &sg_map->sg_dmamap) != 0) { in ahaallocccbs()
648 free(sg_map, M_DEVBUF); in ahaallocccbs()
652 SLIST_INSERT_HEAD(&aha->sg_maps, sg_map, links); in ahaallocccbs()
654 bus_dmamap_load(aha->sg_dmat, sg_map->sg_dmamap, sg_map->sg_vaddr, in ahaallocccbs()
657 segs = sg_map->sg_vaddr; in ahaallocccbs()
658 physaddr = sg_map->sg_physaddr; in ahaallocccbs()