dmaengine: include xor/pq validate in device_has_all_tx_types()
authorDan Williams <dan.j.williams@intel.com>
Fri, 20 Nov 2009 00:10:25 +0000 (17:10 -0700)
committerDan Williams <dan.j.williams@intel.com>
Fri, 20 Nov 2009 06:21:03 +0000 (23:21 -0700)
A channel must include these capabilities to satisfy
ASYNC_TX_DISABLE_CHANNEL_SWITCH.

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

index bd0b248de2cfabc28f1fecd63e5d64ed61236844..b6442f09d0fe2639db62f305be26ef26f567e9c8 100644 (file)
@@ -632,11 +632,15 @@ static bool device_has_all_tx_types(struct dma_device *device)
        #if defined(CONFIG_ASYNC_XOR) || defined(CONFIG_ASYNC_XOR_MODULE)
        if (!dma_has_cap(DMA_XOR, device->cap_mask))
                return false;
+       if (!dma_has_cap(DMA_XOR_VAL, device->cap_mask))
+               return false;
        #endif
 
        #if defined(CONFIG_ASYNC_PQ) || defined(CONFIG_ASYNC_PQ_MODULE)
        if (!dma_has_cap(DMA_PQ, device->cap_mask))
                return false;
+       if (!dma_has_cap(DMA_PQ_VAL, device->cap_mask))
+               return false;
        #endif
 
        return true;