Unverified Commit b6d8ace8 authored by Karen Xie's avatar Karen Xie Committed by GitHub

Merge pull request #68 from jrtc27/engine-start-after-timeout

XDMA: Mark engine as not running when stopping after timeouts
parents 40eb3c5a cf3611e0
......@@ -540,6 +540,7 @@ static int xdma_engine_stop(struct xdma_engine *engine)
(unsigned long)(&engine->regs));
/* dummy read of status register to flush all previous writes */
dbg_tfr("%s(%s) done\n", __func__, engine->name);
engine->running = 0;
return 0;
}
......@@ -735,7 +736,6 @@ static int engine_service_shutdown(struct xdma_engine *engine)
pr_err("Failed to stop engine\n");
return rv;
}
engine->running = 0;
/* awake task on engine's shutdown wait queue */
xlx_wake_up(&engine->shutdown_wq);
......@@ -2837,7 +2837,6 @@ struct xdma_transfer *engine_cyclic_stop(struct xdma_engine *engine)
pr_err("Failed to stop engine\n");
return NULL;
}
engine->running = 0;
if (transfer->cyclic) {
if (engine->xdma_perf)
......@@ -4517,8 +4516,6 @@ void xdma_device_offline(struct pci_dev *pdev, void *dev_hndl)
rv = xdma_engine_stop(engine);
if (rv < 0)
pr_err("Failed to stop engine\n");
else
engine->running = 0;
spin_unlock_irqrestore(&engine->lock, flags);
}
}
......@@ -4534,8 +4531,6 @@ void xdma_device_offline(struct pci_dev *pdev, void *dev_hndl)
rv = xdma_engine_stop(engine);
if (rv < 0)
pr_err("Failed to stop engine\n");
else
engine->running = 0;
spin_unlock_irqrestore(&engine->lock, flags);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment