Skip to content

Commit 12ccea2

Browse files
Maciej Sosnowskidavem330
authored andcommitted
[3/4] I/OAT: fix async_tx.callback checking
async_tx.callback should be checked for the first not the last descriptor in the chain. Cc: <stable@kernel.org> Signed-off-by: Maciej Sosnowski <maciej.sosnowski@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent c2c0b4c commit 12ccea2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/dma/ioat_dma.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ static dma_cookie_t ioat1_tx_submit(struct dma_async_tx_descriptor *tx)
525525
}
526526

527527
hw->ctl = IOAT_DMA_DESCRIPTOR_CTL_CP_STS;
528-
if (new->async_tx.callback) {
528+
if (first->async_tx.callback) {
529529
hw->ctl |= IOAT_DMA_DESCRIPTOR_CTL_INT_GN;
530530
if (first != new) {
531531
/* move callback into to last desc */
@@ -617,7 +617,7 @@ static dma_cookie_t ioat2_tx_submit(struct dma_async_tx_descriptor *tx)
617617
}
618618

619619
hw->ctl |= IOAT_DMA_DESCRIPTOR_CTL_CP_STS;
620-
if (new->async_tx.callback) {
620+
if (first->async_tx.callback) {
621621
hw->ctl |= IOAT_DMA_DESCRIPTOR_CTL_INT_GN;
622622
if (first != new) {
623623
/* move callback into to last desc */

0 commit comments

Comments
 (0)