This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 409431b2ad virtio-mmio: ack the interrupt as soon as possible
409431b2ad is described below
commit 409431b2ad03d2aa7d0d4a345eaf12cba11aa81c
Author: Bowen Wang <[email protected]>
AuthorDate: Sat Oct 7 19:29:20 2023 +0800
virtio-mmio: ack the interrupt as soon as possible
Follow the linux does, avoid miss mmio interrupt
Signed-off-by: Bowen Wang <[email protected]>
---
drivers/virtio/virtio-mmio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/virtio/virtio-mmio.c b/drivers/virtio/virtio-mmio.c
index b9d1f90ebb..663f286554 100644
--- a/drivers/virtio/virtio-mmio.c
+++ b/drivers/virtio/virtio-mmio.c
@@ -721,6 +721,7 @@ static int virtio_mmio_interrupt(int irq, FAR void
*context, FAR void *arg)
uint32_t isr;
isr = metal_io_read32(&vmdev->cfg_io, VIRTIO_MMIO_INTERRUPT_STATUS);
+ metal_io_write32(&vmdev->cfg_io, VIRTIO_MMIO_INTERRUPT_ACK, isr);
if (isr & VIRTIO_MMIO_INTERRUPT_VRING)
{
for (i = 0; i < vmdev->vdev.vrings_num; i++)
@@ -734,7 +735,6 @@ static int virtio_mmio_interrupt(int irq, FAR void
*context, FAR void *arg)
}
}
- metal_io_write32(&vmdev->cfg_io, VIRTIO_MMIO_INTERRUPT_ACK, isr);
return OK;
}