Module Name:    src
Committed By:   jakllsch
Date:           Thu Jul 12 13:05:39 UTC 2018

Modified Files:
        src/sys/dev/pci: ld_virtio.c
        src/sys/dev/virtio: files.virtio

Log Message:
revert previous, unintended, commit


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/pci/ld_virtio.c
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/virtio/files.virtio

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/ld_virtio.c
diff -u src/sys/dev/pci/ld_virtio.c:1.24 src/sys/dev/pci/ld_virtio.c:1.25
--- src/sys/dev/pci/ld_virtio.c:1.24	Thu Jul 12 12:48:50 2018
+++ src/sys/dev/pci/ld_virtio.c	Thu Jul 12 13:05:39 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ld_virtio.c,v 1.24 2018/07/12 12:48:50 jakllsch Exp $	*/
+/*	$NetBSD: ld_virtio.c,v 1.25 2018/07/12 13:05:39 jakllsch Exp $	*/
 
 /*
  * Copyright (c) 2010 Minoura Makoto.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ld_virtio.c,v 1.24 2018/07/12 12:48:50 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld_virtio.c,v 1.25 2018/07/12 13:05:39 jakllsch Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -38,7 +38,6 @@ __KERNEL_RCSID(0, "$NetBSD: ld_virtio.c,
 #include <sys/disk.h>
 #include <sys/mutex.h>
 #include <sys/module.h>
-#include <sys/sysctl.h>
 
 #include <dev/ldvar.h>
 #include <dev/pci/virtioreg.h>
@@ -145,25 +144,6 @@ struct ld_virtio_softc {
 	uint8_t			sc_sync_status;
 };
 
-int ld_virtio_notify_threshold = 0;
-
-static void
-setup_sysctl(void)
-{
-	static bool done;
-
-	if (done)
-		return;
-
-	done = true;
-
-	sysctl_createv(NULL, 0, NULL, NULL,
-	    CTLFLAG_READWRITE, CTLTYPE_INT, "ld_virtio_notify_threshold",
-	    SYSCTL_DESCR(""),
-	    NULL, 0, &ld_virtio_notify_threshold, 0,
-	    CTL_HW, CTL_CREATE, CTL_EOL);
-}
-
 static int	ld_virtio_match(device_t, cfdata_t, void *);
 static void	ld_virtio_attach(device_t, device_t, void *);
 static int	ld_virtio_detach(device_t, int);
@@ -296,7 +276,7 @@ ld_virtio_attach(device_t parent, device
 	sc->sc_virtio = vsc;
 
 	virtio_child_attach_start(vsc, self, IPL_BIO, &sc->sc_vq,
-	    NULL, virtio_vq_intr, VIRTIO_F_PCI_INTR_MPSAFE|VIRTIO_F_PCI_INTR_MSIX,
+	    NULL, virtio_vq_intr, 0,
 	    (VIRTIO_BLK_F_SIZE_MAX | VIRTIO_BLK_F_SEG_MAX |
 	     VIRTIO_BLK_F_GEOMETRY | VIRTIO_BLK_F_RO | VIRTIO_BLK_F_BLK_SIZE |
 	     VIRTIO_BLK_F_FLUSH | VIRTIO_BLK_F_CONFIG_WCE),
@@ -389,8 +369,6 @@ ld_virtio_attach(device_t parent, device
 	ld->sc_flags = LDF_ENABLED | LDF_MPSAFE;
 	ldattach(ld, BUFQ_DISK_DEFAULT_STRAT);
 
-	setup_sysctl();
-
 	return;
 
 err:
@@ -463,10 +441,7 @@ ld_virtio_start(struct ld_softc *ld, str
 			 offsetof(struct virtio_blk_req, vr_status),
 			 sizeof(uint8_t),
 			 false);
-	const bool notify = !dk_strategy_pending(&sc->sc_ld.sc_dksc) ||
-	    sc->sc_ld.sc_queuecnt + 1 >= sc->sc_ld.sc_maxqueuecnt ||
-	    sc->sc_ld.sc_queuecnt + 1 >= (sc->sc_ld.sc_maxqueuecnt * ld_virtio_notify_threshold / 1000);
-	virtio_enqueue_commit(vsc, vq, slot, notify);
+	virtio_enqueue_commit(vsc, vq, slot, true);
 
 	return 0;
 }

Index: src/sys/dev/virtio/files.virtio
diff -u src/sys/dev/virtio/files.virtio:1.3 src/sys/dev/virtio/files.virtio:1.4
--- src/sys/dev/virtio/files.virtio:1.3	Thu Jul 12 12:48:50 2018
+++ src/sys/dev/virtio/files.virtio	Thu Jul 12 13:05:39 2018
@@ -1,11 +1,6 @@
-#	$NetBSD: files.virtio,v 1.3 2018/07/12 12:48:50 jakllsch Exp $
+#	$NetBSD: files.virtio,v 1.4 2018/07/12 13:05:39 jakllsch Exp $
 
 # XXX the contents of the following included file should be moved here
 include "dev/pci/files.virtio"
 
 file	dev/virtio/virtio_mmio.c	virtio_mmio
-
-device	viocon
-attach	viocon at virtio
-file	dev/virtio/viocon.c		viocon	needs-flag
-

Reply via email to