Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Don't call virtio_enqueue_abort when virtio_enqu...



details:   https://anonhg.NetBSD.org/src/rev/58da29c9f6a2
branches:  trunk
changeset: 349210:58da29c9f6a2
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Nov 30 01:36:38 2016 +0000

description:
Don't call virtio_enqueue_abort when virtio_enqueue_reserve fails.
Pointed out by uwe@

diffstat:

 sys/dev/pci/ld_virtio.c |  5 ++---
 sys/dev/pci/viornd.c    |  3 +--
 2 files changed, 3 insertions(+), 5 deletions(-)

diffs (43 lines):

diff -r 909bd0d8dc21 -r 58da29c9f6a2 sys/dev/pci/ld_virtio.c
--- a/sys/dev/pci/ld_virtio.c   Tue Nov 29 23:17:22 2016 +0000
+++ b/sys/dev/pci/ld_virtio.c   Wed Nov 30 01:36:38 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ld_virtio.c,v 1.12 2016/09/27 03:33:32 pgoyette Exp $  */
+/*     $NetBSD: ld_virtio.c,v 1.13 2016/11/30 01:36:38 christos Exp $  */
 
 /*
  * Copyright (c) 2010 Minoura Makoto.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ld_virtio.c,v 1.12 2016/09/27 03:33:32 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld_virtio.c,v 1.13 2016/11/30 01:36:38 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -399,7 +399,6 @@
        r = virtio_enqueue_reserve(vsc, vq, slot, vr->vr_payload->dm_nsegs +
            VIRTIO_BLK_MIN_SEGMENTS);
        if (r != 0) {
-               virtio_enqueue_abort(vsc, vq, slot);
                bus_dmamap_unload(vsc->sc_dmat, vr->vr_payload);
                return r;
        }
diff -r 909bd0d8dc21 -r 58da29c9f6a2 sys/dev/pci/viornd.c
--- a/sys/dev/pci/viornd.c      Tue Nov 29 23:17:22 2016 +0000
+++ b/sys/dev/pci/viornd.c      Wed Nov 30 01:36:38 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: viornd.c,v 1.9 2015/10/27 16:04:19 christos Exp $ */
+/*     $NetBSD: viornd.c,v 1.10 2016/11/30 01:36:38 christos Exp $ */
 /*     $OpenBSD: viornd.c,v 1.1 2014/01/21 21:14:58 sf Exp $   */
 
 /*
@@ -107,7 +107,6 @@
                goto out;
        }
         if (virtio_enqueue_reserve(vsc, vq, slot, 1)) {
-               virtio_enqueue_abort(vsc, vq, slot);
                goto out;
        }
         virtio_enqueue(vsc, vq, slot, sc->sc_dmamap, 0);



Home | Main Index | Thread Index | Old Index