mailbox: mhu: Acknowledge the interrupt only after data is pushed
authorLiviu Dudau <Liviu.Dudau@arm.com>
Thu, 24 Jul 2014 11:21:17 +0000 (12:21 +0100)
committerLiviu Dudau <Liviu.Dudau@arm.com>
Thu, 24 Jul 2014 11:24:31 +0000 (12:24 +0100)
According to the mailbox documentation the controller should ACK
the RX only after it has finished pushing the data up the link.

Signed-off-by: Punit Agrawal <Punit.Agrawal@arm.com>
Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
drivers/mailbox/arm_mhu.c

index 8c87c22..3e7e0e0 100644 (file)
@@ -137,8 +137,8 @@ static irqreturn_t mbox_handler(int irq, void *p)
                               ctlr->payload_base + RX_PAYLOAD(idx),
                               data->rx_size);
                chan->data = NULL;
-               writel(~0, ctlr->mbox_base + RX_CLEAR(idx));
                mbox_link_received_data(p, data);
+               writel(~0, ctlr->mbox_base + RX_CLEAR(idx));
        }
 
        return IRQ_HANDLED;