Skip to content

Commit db47493

Browse files
Leonid Ravichvinodkoul
authored andcommitted
dmaengine: ioat: adding missed issue_pending to timeout handler
completion timeout might trigger unnesesery DMA engine hw reboot in case of missed issue_pending() . Acked-by: Dave Jiang <[email protected]> Signed-off-by: Leonid Ravich <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 2baedcb commit db47493

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

drivers/dma/ioat/dma.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -955,6 +955,15 @@ void ioat_timer_event(struct timer_list *t)
955955
goto unlock_out;
956956
}
957957

958+
/* handle missed issue pending case */
959+
if (ioat_ring_pending(ioat_chan)) {
960+
dev_warn(to_dev(ioat_chan),
961+
"Completion timeout with pending descriptors\n");
962+
spin_lock_bh(&ioat_chan->prep_lock);
963+
__ioat_issue_pending(ioat_chan);
964+
spin_unlock_bh(&ioat_chan->prep_lock);
965+
}
966+
958967
set_bit(IOAT_COMPLETION_ACK, &ioat_chan->state);
959968
mod_timer(&ioat_chan->timer, jiffies + COMPLETION_TIMEOUT);
960969
unlock_out:

0 commit comments

Comments
 (0)