summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorStefan Fritsch <sf@cvs.openbsd.org>2024-11-04 15:41:10 +0000
committerStefan Fritsch <sf@cvs.openbsd.org>2024-11-04 15:41:10 +0000
commita88cbec02742464f8559f5c633f75ede6cad189e (patch)
tree0eedabfddd102c370459ab56c60806e18d4e3890 /sys
parentd71c7465333b7403e8259cba5162381ce40ee9ec (diff)
vio_dump: Fix control queue dump
If the device has just been reset (e.g. after ifconfig down), we cannot query the feature bits. Make sure we dump the control virtqueue even in this case.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pv/if_vio.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/pv/if_vio.c b/sys/dev/pv/if_vio.c
index 06ad4b8fddb..c1b28d0b983 100644
--- a/sys/dev/pv/if_vio.c
+++ b/sys/dev/pv/if_vio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vio.c,v 1.57 2024/10/03 08:59:49 sf Exp $ */
+/* $OpenBSD: if_vio.c,v 1.58 2024/11/04 15:41:09 sf Exp $ */
/*
* Copyright (c) 2012 Stefan Fritsch, Alexander Fiveg.
@@ -1054,7 +1054,6 @@ void
vio_dump(struct vio_softc *sc)
{
struct ifnet *ifp = &sc->sc_ac.ac_if;
- struct virtio_softc *vsc = sc->sc_virtio;
int i;
printf("%s status dump:\n", ifp->if_xname);
@@ -1066,7 +1065,7 @@ vio_dump(struct vio_softc *sc)
printf("%d: RX virtqueue:\n", i);
virtio_vq_dump(sc->sc_q[i].viq_rxvq);
}
- if (virtio_has_feature(vsc, VIRTIO_NET_F_CTRL_VQ)) {
+ if (sc->sc_ctl_vq != NULL) {
printf("CTL virtqueue:\n");
virtio_vq_dump(sc->sc_ctl_vq);
printf("ctrl_inuse: %d\n", sc->sc_ctrl_inuse);