Skip to content

Commit

Permalink
xilinx_axidma: Do not set DMA .notify to NULL after notify
Browse files Browse the repository at this point in the history
If a stream notify function is not ready, it may re-populate the notify call-
back to indicate it should be re-polled later. This break in this usage, as
immediately following the notify() call, .notify is set to NULL. reverse the
ordering of the notify call and NULL assignment accordingly.

[PC: Reworked commit message]

Signed-off-by: Wendy Liang <jliang@xilinx.com>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
  • Loading branch information
wjliang authored and edgarigl committed Jun 10, 2013
1 parent 4e298e4 commit 4f293bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hw/dma/xilinx_axidma.c
Expand Up @@ -514,8 +514,9 @@ static void axidma_write(void *opaque, hwaddr addr,
break;
}
if (sid == 1 && d->notify) {
d->notify(d->notify_opaque);
StreamCanPushNotifyFn notifytmp = d->notify;
d->notify = NULL;
notifytmp(d->notify_opaque);
}
stream_update_irq(s);
}
Expand Down

0 comments on commit 4f293bd

Please sign in to comment.