Merge branch 'dmaengine' into async-tx-next
[firefly-linux-kernel-4.4.55.git] / drivers / dma / ioat / dma.h
index c2939b289185abebe9efa50f77d8f26bad18242c..6a675a2a2d1cffbe05938d3981f4945a21df1997 100644 (file)
  * @enumerate_channels: hw version specific channel enumeration
  * @cleanup_tasklet: select between the v2 and v3 cleanup routines
  * @timer_fn: select between the v2 and v3 timer watchdog routines
+ * @self_test: hardware version specific self test for each supported op type
  *
  * Note: the v3 cleanup routine supports raid operations
  */
-
 struct ioatdma_device {
        struct pci_dev *pdev;
        void __iomem *reg_base;
@@ -80,6 +80,7 @@ struct ioatdma_device {
        int (*enumerate_channels)(struct ioatdma_device *device);
        void (*cleanup_tasklet)(unsigned long data);
        void (*timer_fn)(unsigned long data);
+       int (*self_test)(struct ioatdma_device *device);
 };
 
 struct ioat_chan_common {
@@ -170,7 +171,7 @@ ioat_is_complete(struct dma_chan *c, dma_cookie_t cookie,
  * struct ioat_desc_sw - wrapper around hardware descriptor
  * @hw: hardware DMA descriptor (for memcpy)
  * @node: this descriptor will either be on the free list,
- *     or attached to a transaction list (async_tx.tx_list)
+ *     or attached to a transaction list (tx_list)
  * @txd: the generic software descriptor for all engines
  * @id: identifier for debug
  */
@@ -178,6 +179,7 @@ struct ioat_desc_sw {
        struct ioat_dma_descriptor *hw;
        struct list_head node;
        size_t len;
+       struct list_head tx_list;
        struct dma_async_tx_descriptor txd;
        #ifdef DEBUG
        int id;
@@ -313,6 +315,7 @@ static inline void ioat_unmap(struct pci_dev *pdev, dma_addr_t addr, size_t len,
 int __devinit ioat_probe(struct ioatdma_device *device);
 int __devinit ioat_register(struct ioatdma_device *device);
 int __devinit ioat1_dma_probe(struct ioatdma_device *dev, int dca);
+int __devinit ioat_dma_self_test(struct ioatdma_device *device);
 void __devexit ioat_dma_remove(struct ioatdma_device *device);
 struct dca_provider * __devinit ioat_dca_init(struct pci_dev *pdev,
                                              void __iomem *iobase);