diff options
author | Stefan Fritsch <sf@cvs.openbsd.org> | 2015-04-26 12:27:30 +0000 |
---|---|---|
committer | Stefan Fritsch <sf@cvs.openbsd.org> | 2015-04-26 12:27:30 +0000 |
commit | 443a244fdb7fde8187493d86a359fb53ad769589 (patch) | |
tree | 2c29cc3541bf32a1d4d0ae3d809cc33466ff889b | |
parent | e598a392e3dc11a377b2fd168b0c2baa981cd92c (diff) |
Have vio_start() check if the queue is empty.
from brad@
-rw-r--r-- | sys/dev/pci/if_vio.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/pci/if_vio.c b/sys/dev/pci/if_vio.c index 9a297e1bca9..7235e863fa3 100644 --- a/sys/dev/pci/if_vio.c +++ b/sys/dev/pci/if_vio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vio.c,v 1.29 2015/04/26 12:19:24 sf Exp $ */ +/* $OpenBSD: if_vio.c,v 1.30 2015/04/26 12:27:29 sf Exp $ */ /* * Copyright (c) 2012 Stefan Fritsch, Alexander Fiveg. @@ -726,6 +726,8 @@ vio_start(struct ifnet *ifp) if ((ifp->if_flags & (IFF_RUNNING|IFF_OACTIVE)) != IFF_RUNNING) return; + if (IFQ_IS_EMPTY(&ifp->if_snd)) + return; again: for (;;) { @@ -1117,8 +1119,7 @@ vio_tx_intr(struct virtqueue *vq) int r; r = vio_txeof(vq); - if (!IFQ_IS_EMPTY(&ifp->if_snd)) - vio_start(ifp); + vio_start(ifp); return r; } |