[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-stable] [PATCH v1 1/1] xilinx_axidma: Do not set DMA .notify to NU

From: peter . crosthwaite
Subject: [Qemu-stable] [PATCH v1 1/1] xilinx_axidma: Do not set DMA .notify to NULL after notify
Date: Fri, 7 Jun 2013 13:05:38 +1000

From: Wendy Liang <address@hidden>

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 <address@hidden>
Signed-off-by: Peter Crosthwaite <address@hidden>
 hw/dma/xilinx_axidma.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hw/dma/xilinx_axidma.c b/hw/dma/xilinx_axidma.c
index 3a3ef8a..50054cf 100644
--- a/hw/dma/xilinx_axidma.c
+++ b/hw/dma/xilinx_axidma.c
@@ -514,8 +514,9 @@ static void axidma_write(void *opaque, hwaddr addr,
     if (sid == 1 && d->notify) {
-        d->notify(d->notify_opaque);
+        StreamCanPushNotifyFn notifytmp = d->notify;
         d->notify = NULL;
+        notifytmp(d->notify_opaque);

reply via email to

[Prev in Thread] Current Thread [Next in Thread]