Date: Fri, 10 Aug 2001 23:05:28 -0400 From: Assem Salama <assem@twcny.rr.com> To: "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org> Subject: dma_tag_create Message-ID: <3B74A0F8.68E02C78@twcny.rr.com>
next in thread | raw e-mail | index | archive | help
Hello, What is the meaning of the maxsegsz argument of dma_tag_create? It doesn't seam to have any effect. This is my code: /* try to allocate some DMA memory */ if(bus_dma_tag_create( NULL, /* parent */ (1<<16), /* allignment (64K) */ (0), /* boundry */ BUS_SPACE_MAXSIZE_32BIT,/* lowaddr */ BUS_SPACE_MAXSIZE, /* high addr */ NULL, NULL, /* filter, filterarg */ (1<<14), /* maxsize (256K) */ 4, /* num segs */ (1<<10), /* maxsegsize */ 0, &dma_tag)) { PRINTERR("Could not make the DMA tag!\n"); return ENXIO; } if(bus_dmamem_alloc(dma_tag, (void*)&DMA_buffer, BUS_DMA_NOWAIT, &dma_map)) { PRINTERR("Could not allocate memory!\n"); bus_dma_tag_destroy(dma_tag); return ENXIO; } if(bus_dmamap_load(dma_tag, dma_map, DMA_buffer, (1<<12), ide_mod_load_map, &phys_addr, 0)) { PRINTERR("Could not load the map!\n"); bus_dmamem_free(dma_tag, DMA_buffer, dma_map); bus_dma_tag_destroy(dma_tag); return ENXIO; } Thanks, Assem Salama To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B74A0F8.68E02C78>