From owner-freebsd-arch@FreeBSD.ORG Tue Oct 2 19:02:23 2007 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4CF7D16A4CC for ; Tue, 2 Oct 2007 19:02:23 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe01.swip.net [212.247.154.1]) by mx1.freebsd.org (Postfix) with ESMTP id 1E13213C455 for ; Tue, 2 Oct 2007 19:02:20 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] Received: from [85.19.218.45] (account mc467741@c2i.net [85.19.218.45] verified) by mailfe01.swip.net (CommuniGate Pro SMTP 5.1.10) with ESMTPA id 615070863; Tue, 02 Oct 2007 21:02:18 +0200 From: Hans Petter Selasky To: freebsd-arch@freebsd.org Date: Tue, 2 Oct 2007 21:02:37 +0200 User-Agent: KMail/1.9.7 References: <200709260131.49156.hselasky@c2i.net> <200709262157.02712.hselasky@c2i.net> <46FB03B1.6020100@samsco.org> In-Reply-To: <46FB03B1.6020100@samsco.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200710022102.38495.hselasky@c2i.net> Cc: Scott Long Subject: Re: Request for feedback on common data backstore in the kernel X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2007 19:02:23 -0000 On Thursday 27 September 2007, Scott Long wrote: > Hans Petter Selasky wrote: > > > > I'm thinking about putting some wrappers around the "bus_dmamap_load()" > > function like: > > > > void usbd_rx_buf_load(struct usbd_xfer *xfer, void *buf, > > uint32_t framebuffer_offset, uint32_t framebuffer_index, uint32_t len); > > > > void usbd_tx_buf_load(struct usbd_xfer *xfer, void *buf, > > uint32_t framebuffer_offset, uint32_t framebuffer_index, uint32_t len); > > > > But I haven't figured out all the details yet. The "usbd_xxx_load()" > > functions should automagically figure out what is best to do and it won't > > be more than a few lines of code. > > Can you describe what these two wrappers are supposed to do? Basically these wrappers will setup the DMA address for the USB HC driver. If they need to copy data they will copy data. > Are you expecting bus_dmamap_load() to operate synchronously? Yes. I assume that "bus_dmamap_load()" can sleep and consequently needs a thread context. --HPS