dmaengine: ioat: stop mod_timer from resurrecting deleted timer in __cleanup()
authorDave Jiang <dave.jiang@intel.com>
Mon, 19 Sep 2022 16:58:42 +0000 (09:58 -0700)
committerVinod Koul <vkoul@kernel.org>
Thu, 29 Sep 2022 17:16:08 +0000 (22:46 +0530)
commit898ec89dbb55b8294695ad71694a0684e62b2a73
tree5c53f5c5c5f9657fadd97ae2b2497336f41b822e
parentb9d2140c3badf4107973ad77c5a0ec3075705c85
dmaengine: ioat: stop mod_timer from resurrecting deleted timer in __cleanup()

User reports observing timer event report channel halted but no error
observed in CHANERR register. The driver finished self-test and released
channel resources. Debug shows that __cleanup() can call
mod_timer() after the timer has been deleted and thus resurrect the
timer. While harmless, it causes suprious error message to be emitted.
Use mod_timer_pending() call to prevent deleted timer from being
resurrected.

Fixes: 3372de5813e4 ("dmaengine: ioatdma: removal of dma_v3.c and relevant ioat3 references")
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/166360672197.3851724.17040290563764838369.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/ioat/dma.c