]> git.hungrycats.org Git - linux/commitdiff
I/OAT: fix async_tx.callback checking
authorMaciej Sosnowski <maciej.sosnowski@intel.com>
Tue, 11 Nov 2008 17:50:05 +0000 (17:50 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 13 Nov 2008 17:56:00 +0000 (09:56 -0800)
commit 12ccea24e309d815d058cdc6ee8bf2c4b85f0c5f upstream

async_tx.callback should be checked for the first
not the last descriptor in the chain.

Signed-off-by: Maciej Sosnowski <maciej.sosnowski@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/dma/ioat_dma.c

index b762db2e8073f9adf4054ad076451ebf1a653221..3f4db5460d1aa1508f828db2ad765b323524d18d 100644 (file)
@@ -519,7 +519,7 @@ static dma_cookie_t ioat1_tx_submit(struct dma_async_tx_descriptor *tx)
        }
 
        hw->ctl = IOAT_DMA_DESCRIPTOR_CTL_CP_STS;
-       if (new->async_tx.callback) {
+       if (first->async_tx.callback) {
                hw->ctl |= IOAT_DMA_DESCRIPTOR_CTL_INT_GN;
                if (first != new) {
                        /* move callback into to last desc */
@@ -611,7 +611,7 @@ static dma_cookie_t ioat2_tx_submit(struct dma_async_tx_descriptor *tx)
        }
 
        hw->ctl |= IOAT_DMA_DESCRIPTOR_CTL_CP_STS;
-       if (new->async_tx.callback) {
+       if (first->async_tx.callback) {
                hw->ctl |= IOAT_DMA_DESCRIPTOR_CTL_INT_GN;
                if (first != new) {
                        /* move callback into to last desc */