-/* $OpenBSD: vioblk.c,v 1.10 2016/07/14 12:42:00 sf Exp $ */
+/* $OpenBSD: vioblk.c,v 1.11 2016/07/14 12:44:53 sf Exp $ */
/*
* Copyright (c) 2012 Stefan Fritsch.
timeout = 1000;
do {
- if (vsc->sc_ops->intr(vsc) && vr->vr_len == VIOBLK_DONE)
+ if (virtio_poll_intr(vsc) && vr->vr_len == VIOBLK_DONE)
break;
delay(1000);
-/* $OpenBSD: vioscsi.c,v 1.4 2016/07/14 12:42:00 sf Exp $ */
+/* $OpenBSD: vioscsi.c,v 1.5 2016/07/14 12:44:53 sf Exp $ */
/*
* Copyright (c) 2013 Google Inc.
*
DPRINTF("vioscsi_scsi_cmd: polling...\n");
int timeout = 1000;
do {
- vsc->sc_ops->intr(vsc);
+ virtio_poll_intr(vsc);
if (vr->vr_xs != xs)
break;
delay(1000);
-/* $OpenBSD: virtiovar.h,v 1.7 2016/07/14 12:42:00 sf Exp $ */
+/* $OpenBSD: virtiovar.h,v 1.8 2016/07/14 12:44:53 sf Exp $ */
/* $NetBSD: virtiovar.h,v 1.1 2011/10/30 12:12:21 hannken Exp $ */
/*
void (*setup_queue)(struct virtio_softc *, uint16_t, uint32_t);
void (*set_status)(struct virtio_softc *, int);
uint32_t (*neg_features)(struct virtio_softc *, uint32_t, const struct virtio_feature_name *);
- int (*intr)(void *);
+ int (*poll_intr)(void *);
};
#define VIRTIO_CHILD_ERROR ((void*)1)
#define virtio_read_queue_size(sc, i) (sc)->sc_ops->read_queue_size(sc, i)
#define virtio_setup_queue(sc, i, v) (sc)->sc_ops->setup_queue(sc, i, v)
#define virtio_negotiate_features(sc, f, n) (sc)->sc_ops->neg_features(sc, f, n)
+#define virtio_poll_intr(sc) (sc)->sc_ops->poll_intr(sc)
int virtio_alloc_vq(struct virtio_softc*, struct virtqueue*, int, int, int,
const char*);