From owner-freebsd-hackers Mon Aug 20 23:30:31 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from aslan.scsiguy.com (aslan.scsiguy.com [63.229.232.106]) by hub.freebsd.org (Postfix) with ESMTP id 9D4BE37B40C; Mon, 20 Aug 2001 23:30:26 -0700 (PDT) (envelope-from gibbs@scsiguy.com) Received: from scsiguy.com (localhost [127.0.0.1]) by aslan.scsiguy.com (8.11.5/8.11.5) with ESMTP id f7L6UNY90382; Tue, 21 Aug 2001 00:30:23 -0600 (MDT) (envelope-from gibbs@scsiguy.com) Message-Id: <200108210630.f7L6UNY90382@aslan.scsiguy.com> To: mjacob@feral.com Cc: Bill Paul , hackers@FreeBSD.ORG, current@FreeBSD.ORG Subject: Re: Where to put new bus_dmamap_load_mbuf() code In-Reply-To: Your message of "Mon, 20 Aug 2001 22:53:06 PDT." <20010820225225.G39850-100000@wonky.feral.com> Date: Tue, 21 Aug 2001 00:30:23 -0600 From: "Justin T. Gibbs" 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 > >Correction. > >This sample: >> >> if (bus_dma_tag_create(pci->parent_dmat, PAGE_SIZE, lim, >> BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, len, 1, >> BUS_SPACE_MAXSIZE_32BIT, 0, &pci->cntrol_dmat) != 0) { >> isp_prt(isp, ISP_LOGERR, >> "cannot create a dma tag for control spaces"); >> free(isp->isp_xflist, M_DEVBUF); >> free(pci->dmaps, M_DEVBUF); >> return (1); >> } >> You'll need to change the number of segments to match the max supported by the card (or the max you will ever need). This example made me realize that the bounce code doesn't deal with multiple segments being copied into a single page (i.e. tracking and using remaining free space in a page already allocated for bouncing for a single map). I'll have to break loose some time to fix that. -- Justin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message