summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_vmx.c
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2013-06-03 15:05:30 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2013-06-03 15:05:30 +0000
commitebd506cd95f888796ecca05fb6124d563f48f6ad (patch)
treeb49632b83adcb8b746539fa5af0aa44ceaa99f67 /sys/dev/pci/if_vmx.c
parent455f36c2b315fa9dffe024a7e536eff79e05ac56 (diff)
Use IF_POLL to check for available transmit descriptors before IF_DEQUEUE.
ok uebayasi@ yasuoka@ dlg@
Diffstat (limited to 'sys/dev/pci/if_vmx.c')
-rw-r--r--sys/dev/pci/if_vmx.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/pci/if_vmx.c b/sys/dev/pci/if_vmx.c
index d7e5e935f07..d9fc9241423 100644
--- a/sys/dev/pci/if_vmx.c
+++ b/sys/dev/pci/if_vmx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vmx.c,v 1.1 2013/05/31 20:14:18 uebayasi Exp $ */
+/* $OpenBSD: if_vmx.c,v 1.2 2013/06/03 15:05:29 reyk Exp $ */
/*
* Copyright (c) 2013 Tsubai Masanari
@@ -1038,7 +1038,10 @@ vmxnet3_start(struct ifnet *ifp)
if ((ifp->if_flags & (IFF_RUNNING | IFF_OACTIVE)) != IFF_RUNNING)
return;
- while (IFQ_LEN(&ifp->if_snd) > 0) {
+ for (;;) {
+ IFQ_POLL(&ifp->if_snd, m);
+ if (m == NULL)
+ break;
if ((ring->next - ring->head - 1) % NTXDESC < 8) {
ifp->if_flags |= IFF_OACTIVE;
break;