Re: New USB stack and Zero copy.

看板FB_hackers作者時間18年前 (2007/07/24 10:54), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串4/9 (看更多)
On Thursday 05 July 2007 03:31:59 am Hans Petter Selasky wrote: > On Wednesday 04 July 2007 19:35, John-Mark Gurney wrote: > > Hans Petter Selasky wrote this message on Wed, Jul 04, 2007 at 09:01 +0200: > > > Also: How is the easiest way to load memory pages into DMA ? And I want > > > that the loadig works like this, that when the page must be bounced it > > > should not allocate a bounce buffer, hence I already have a bounce > > > buffer. I only need to know which pages I can forward directly to the USB > > > hardware, and the rest I will bounce somewhere else. > > > > Why do you not want to let bus_dma do the bouncing for you? If it's > > to save a copy to another buffer, why don't you load the final buffer > > into bus_dma? > > Because if I let bus_dma do the bounching, I cannot do this while holding a > mutex, hence allocating DMA'able memory on the fly is not so good. This is not a hard problem to solve, every other driver using bus_dma solves it. Just make sure your driver is in a sane state and drop the lock while you let bus_dmamap_load() map/copy things for you. -- John Baldwin _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
文章代碼(AID): #16fMdU00 (FB_hackers)
討論串 (同標題文章)
文章代碼(AID): #16fMdU00 (FB_hackers)