summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorriastradh <riastradh@NetBSD.org>2022-08-09 12:42:05 +0000
committerriastradh <riastradh@NetBSD.org>2022-08-09 12:42:05 +0000
commit2acd9cbed546947e46ed558e7960cf7ba3a39a34 (patch)
tree60fccf236acd23957d76c3e5b251b4af80a0ec96 /sys/dev
parent6ad6faad26b8a912ad079d63e43b4ba52d29b8d5 (diff)
virtio(4): Move comment for virtio_vq_intr.
No functional change intended.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/virtio.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/sys/dev/pci/virtio.c b/sys/dev/pci/virtio.c
index 7f0fb5f086b..d1b0b3fdfcb 100644
--- a/sys/dev/pci/virtio.c
+++ b/sys/dev/pci/virtio.c
@@ -1,4 +1,4 @@
-/* $NetBSD: virtio.c,v 1.55 2022/06/18 22:11:01 andvar Exp $ */
+/* $NetBSD: virtio.c,v 1.56 2022/08/09 12:42:05 riastradh Exp $ */
/*
* Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: virtio.c,v 1.55 2022/06/18 22:11:01 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: virtio.c,v 1.56 2022/08/09 12:42:05 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -465,13 +465,6 @@ vq_sync_indirect(struct virtio_softc *sc, struct virtqueue *vq, int slot,
ops);
}
-/*
- * Can be used as sc_intrhand.
- */
-/*
- * Scan vq, bus_dmamap_sync for the vqs (not for the payload),
- * and calls (*vq_done)() if some entries are consumed.
- */
bool
virtio_vq_is_enqueued(struct virtio_softc *sc, struct virtqueue *vq)
{
@@ -486,6 +479,12 @@ virtio_vq_is_enqueued(struct virtio_softc *sc, struct virtqueue *vq)
return (vq->vq_used_idx != virtio_rw16(sc, vq->vq_used->idx)) ? 1 : 0;
}
+/*
+ * Scan vq, bus_dmamap_sync for the vqs (not for the payload),
+ * and calls (*vq_done)() if some entries are consumed.
+ *
+ * Can be used as sc_intrhand.
+ */
int
virtio_vq_intr(struct virtio_softc *sc)
{