]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
ioat2+: add fence support
authorDan Williams <dan.j.williams@intel.com>
Wed, 9 Sep 2009 00:42:53 +0000 (17:42 -0700)
committerDan Williams <dan.j.williams@intel.com>
Wed, 9 Sep 2009 00:42:53 +0000 (17:42 -0700)
In preparation for adding more operation types to the ioat3 path the
driver needs to honor the DMA_PREP_FENCE flag.  For example the async_tx api
will hand xor->memcpy->xor chains to the driver with the 'fence' flag set on
the first xor and the memcpy operation.  This flag in turn sets the 'fence'
flag in the descriptor control field telling the hardware that future
descriptors in the chain depend on the result of the current descriptor, so
wait for all writes to complete before starting the next operation.

Note that ioat1 does not prefetch the descriptor chain, so does not
require/support fenced operations.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/dma/ioat/dma_v2.c

index 460b7730133246d522cc6bb96321b4c0156109ac..568923c5ddec1da3c24435c15e2c72cb09e33ee2 100644 (file)
@@ -710,6 +710,7 @@ ioat2_dma_prep_memcpy_lock(struct dma_chan *c, dma_addr_t dma_dest,
        desc->txd.flags = flags;
        desc->len = total_len;
        hw->ctl_f.int_en = !!(flags & DMA_PREP_INTERRUPT);
+       hw->ctl_f.fence = !!(flags & DMA_PREP_FENCE);
        hw->ctl_f.compl_write = 1;
        dump_desc_dbg(ioat, desc);
        /* we leave the channel locked to ensure in order submission */