Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci do not set IFF_OACTIVE if dma map load or the vi...



details:   https://anonhg.NetBSD.org/src/rev/713d67109962
branches:  trunk
changeset: 823984:713d67109962
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Wed May 17 18:21:40 2017 +0000

description:
do not set IFF_OACTIVE if dma map load or the virtio reserve fails;
this causes interface to ignore any further TX requests if this happens
when there are no other TX requests in progress

fixes kern/52211 by Juergen Hannken-Illjes

diffstat:

 sys/dev/pci/if_vioif.c |  9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diffs (38 lines):

diff -r 13deb2d2d3ef -r 713d67109962 sys/dev/pci/if_vioif.c
--- a/sys/dev/pci/if_vioif.c    Wed May 17 14:15:29 2017 +0000
+++ b/sys/dev/pci/if_vioif.c    Wed May 17 18:21:40 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_vioif.c,v 1.34 2017/03/28 04:10:33 ozaki-r Exp $    */
+/*     $NetBSD: if_vioif.c,v 1.35 2017/05/17 18:21:40 jdolecek Exp $   */
 
 /*
  * Copyright (c) 2010 Minoura Makoto.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_vioif.c,v 1.34 2017/03/28 04:10:33 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vioif.c,v 1.35 2017/05/17 18:21:40 jdolecek Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -844,7 +844,6 @@
                if (r != 0) {
                        bus_dmamap_unload(virtio_dmat(vsc),
                                          sc->sc_tx_dmamaps[slot]);
-                       ifp->if_flags |= IFF_OACTIVE;
                        vioif_tx_vq_done_locked(vq);
                        if (retry++ == 0)
                                goto retry;
@@ -868,10 +867,8 @@
                bpf_mtap(ifp, m);
        }
 
-       if (m != NULL) {
-               ifp->if_flags |= IFF_OACTIVE;
+       if (m != NULL)
                m_freem(m);
-       }
 
        if (queued > 0) {
                virtio_enqueue_commit(vsc, vq, -1, true);



Home | Main Index | Thread Index | Old Index