From owner-freebsd-hackers Fri Aug 10 20:11:40 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mailout6.nyroc.rr.com (mailout6-0.nyroc.rr.com [24.92.226.125]) by hub.freebsd.org (Postfix) with ESMTP id B480037B407 for ; Fri, 10 Aug 2001 20:11:37 -0700 (PDT) (envelope-from assem@twcny.rr.com) Received: from twcny.rr.com (syr-24-92-246-130.twcny.rr.com [24.92.246.130]) by mailout6.nyroc.rr.com (8.11.2/RoadRunner 1.03) with ESMTP id f7B3BJ707673 for ; Fri, 10 Aug 2001 23:11:32 -0400 (EDT) Message-ID: <3B74A0F8.68E02C78@twcny.rr.com> Date: Fri, 10 Aug 2001 23:05:28 -0400 From: Assem Salama X-Mailer: Mozilla 4.77 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: "freebsd-hackers@freebsd.org" Subject: dma_tag_create Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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