Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Jun 2003 15:33:14 -0400 (EDT)
From:      Andrew Gallatin <gallatin@cs.duke.edu>
To:        Scott Long <scott_long@btc.adaptec.com>
Cc:        freebsd-arch@freebsd.org
Subject:   Re: API change for bus_dma
Message-ID:  <16124.39930.142492.356163@grasshopper.cs.duke.edu>
In-Reply-To: <3EF3C12F.9060303@btc.adaptec.com>
References:  <3EF3C12F.9060303@btc.adaptec.com>

next in thread | previous in thread | raw e-mail | index | archive | help

Scott Long writes:
 > All,
 > 
 > As I work towards locking down storage drivers, I'm also preening their
 > use of busdma.  A common theme among them is a misuse of
 > bus_dmamap_load() and the associated callback mechanism.  For most, the

Why not just add a way to avoid deferring the callback entirely?  I'm
talking about something like Solaris' ability to pass DDI_DMA_DONTWAIT
as the callback function to ddi_dma_buf_bind_handle().

My desire is to know immediately whether the DMA mapping failed.  If
it failed, that's OK with me. Since my driver locks users memory and maps
it for DMA for a potentially unbounded amount of time, I want to
know about a failure right away, not pile up requests that will never
be satisfied.

Can I get the behaviour I'm after by adding BUS_DMA_NOWAIT to the
flags I pass to bus_dmamap_load()?

Drew






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?16124.39930.142492.356163>