Module Name: src
Committed By: jmcneill
Date: Sat Nov 19 12:32:54 UTC 2011
Modified Files:
src/sys/dev/pci: if_vioif.c
Log Message:
fix build when ALTQ is defined
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/if_vioif.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/pci/if_vioif.c
diff -u src/sys/dev/pci/if_vioif.c:1.1 src/sys/dev/pci/if_vioif.c:1.2
--- src/sys/dev/pci/if_vioif.c:1.1 Sun Oct 30 12:12:21 2011
+++ src/sys/dev/pci/if_vioif.c Sat Nov 19 12:32:54 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: if_vioif.c,v 1.1 2011/10/30 12:12:21 hannken Exp $ */
+/* $NetBSD: if_vioif.c,v 1.2 2011/11/19 12:32:54 jmcneill Exp $ */
/*
* Copyright (c) 2010 Minoura Makoto.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_vioif.c,v 1.1 2011/10/30 12:12:21 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vioif.c,v 1.2 2011/11/19 12:32:54 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -675,9 +675,13 @@ vioif_start(struct ifnet *ifp)
if ((ifp->if_flags & (IFF_RUNNING|IFF_OACTIVE)) != IFF_RUNNING)
return;
- while (IFQ_POLL(&ifp->if_snd, m), m != NULL) {
+ for (;;) {
int slot, r;
+ IFQ_POLL(&ifp->if_snd, m);
+ if (m == NULL)
+ break;
+
r = virtio_enqueue_prep(vsc, vq, &slot);
if (r == EAGAIN) {
ifp->if_flags |= IFF_OACTIVE;