From db474931df3eb54edbf761b8c98ba517bdf24463 Mon Sep 17 00:00:00 2001 From: Leonid Ravich Date: Thu, 23 Apr 2020 00:09:18 +0300 Subject: 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 Signed-off-by: Leonid Ravich Link: https://lore.kernel.org/r/1587589761-32690-3-git-send-email-leonid.ravich@dell.com Signed-off-by: Vinod Koul --- drivers/dma/ioat/dma.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'drivers/dma/ioat/dma.c') diff --git a/drivers/dma/ioat/dma.c b/drivers/dma/ioat/dma.c index 55a8cf181816..8ad0ad861c86 100644 --- a/drivers/dma/ioat/dma.c +++ b/drivers/dma/ioat/dma.c @@ -955,6 +955,15 @@ void ioat_timer_event(struct timer_list *t) goto unlock_out; } + /* handle missed issue pending case */ + if (ioat_ring_pending(ioat_chan)) { + dev_warn(to_dev(ioat_chan), + "Completion timeout with pending descriptors\n"); + spin_lock_bh(&ioat_chan->prep_lock); + __ioat_issue_pending(ioat_chan); + spin_unlock_bh(&ioat_chan->prep_lock); + } + set_bit(IOAT_COMPLETION_ACK, &ioat_chan->state); mod_timer(&ioat_chan->timer, jiffies + COMPLETION_TIMEOUT); unlock_out: -- cgit v1.2.3