mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
dmaengine: pl330: fix bug that chan descdone is null
The pl330 irq may come after terminal chan, and desc is set null. It can't be avoided by disabling irq, because other chans use the common irq. If the chan is terminaled, we needn't call its callback or restart it. Change-Id: I73201eaa4dbdd09c765129f9f3f41573c73faf73 Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
This commit is contained in:
@@ -1787,16 +1787,17 @@ static int pl330_update(struct pl330_dmac *pl330)
|
||||
|
||||
/* Detach the req */
|
||||
descdone = thrd->req[active].desc;
|
||||
if (descdone) {
|
||||
if (!descdone->cyclic) {
|
||||
thrd->req[active].desc = NULL;
|
||||
thrd->req_running = -1;
|
||||
/* Get going again ASAP */
|
||||
_start(thrd);
|
||||
}
|
||||
|
||||
if (!descdone->cyclic) {
|
||||
thrd->req[active].desc = NULL;
|
||||
thrd->req_running = -1;
|
||||
/* Get going again ASAP */
|
||||
_start(thrd);
|
||||
/* For now, just make a list of callbacks to be done */
|
||||
list_add_tail(&descdone->rqd, &pl330->req_done);
|
||||
}
|
||||
|
||||
/* For now, just make a list of callbacks to be done */
|
||||
list_add_tail(&descdone->rqd, &pl330->req_done);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user