summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej Sosnowski <maciej.sosnowski@intel.com>2008-11-11 17:50:05 +0000
committerGreg Kroah-Hartman <gregkh@suse.de>2008-11-13 09:56:00 -0800
commitd2edcdc5ad15bc5565e1e968cc43ed90c5c0a9e4 (patch)
tree13a57dc6aa9f02f5ccf638bac77ce213421d5bef
parent33cfbb0629d7e08875f23ceeff21c4067a0937e5 (diff)
downloadlwn-d2edcdc5ad15bc5565e1e968cc43ed90c5c0a9e4.tar.gz
lwn-d2edcdc5ad15bc5565e1e968cc43ed90c5c0a9e4.zip
I/OAT: fix async_tx.callback checking
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>
-rw-r--r--drivers/dma/ioat_dma.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/dma/ioat_dma.c b/drivers/dma/ioat_dma.c
index b762db2e8073..3f4db5460d1a 100644
--- a/drivers/dma/ioat_dma.c
+++ b/drivers/dma/ioat_dma.c
@@ -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 */