[Zrouter-src-freebsd] ZRouter.org: push to FreeBSD HEAD tree

zrouter-src-freebsd at zrouter.org zrouter-src-freebsd at zrouter.org
Sun Jan 22 00:01:23 UTC 2012


details:   http://zrouter.org/hg/FreeBSD/head//rev/84e6a6ccd2cc
changeset: 293:84e6a6ccd2cc
user:      ray at terran.dlink.ua
date:      Sun Jan 22 02:03:10 2012 +0200
description:
Restore original.

diffstat:

 head/sys/kern/subr_bus.c |  18 ++++--------------
 1 files changed, 4 insertions(+), 14 deletions(-)

diffs (42 lines):

diff -r c912f3c9bbad -r 84e6a6ccd2cc head/sys/kern/subr_bus.c
--- a/head/sys/kern/subr_bus.c	Sun Jan 22 00:40:32 2012 +0200
+++ b/head/sys/kern/subr_bus.c	Sun Jan 22 02:03:10 2012 +0200
@@ -356,7 +356,7 @@
 SYSCTL_PROC(_hw_bus, OID_AUTO, devctl_disable, CTLTYPE_INT | CTLFLAG_RW, NULL,
     0, sysctl_devctl_disable, "I", "devctl disable -- deprecated");
 
-#define DEVCTL_DEFAULT_QUEUE_LEN 10000
+#define DEVCTL_DEFAULT_QUEUE_LEN 1000
 static int sysctl_devctl_queue(SYSCTL_HANDLER_ARGS);
 static int devctl_queue_length = DEVCTL_DEFAULT_QUEUE_LEN;
 TUNABLE_INT("hw.bus.devctl_queue", &devctl_queue_length);
@@ -468,17 +468,8 @@
 	TAILQ_REMOVE(&devsoftc.devq, n1, dei_link);
 	devsoftc.queued--;
 	mtx_unlock(&devsoftc.mtx);
-	/*
-	 * XXX: if data in buffer > hw.bus.devctl_queue, then n1->dei_data
-	 * is null
-	 */
-	if ( n1->dei_data != NULL ) {
-		rv = uiomove(n1->dei_data, strlen(n1->dei_data), uio);
-	        free(n1->dei_data, M_BUS);
-	} else
-		/* XXX: return empty string */
-		rv = uiomove("", 1, uio);
-
+	rv = uiomove(n1->dei_data, strlen(n1->dei_data), uio);
+	free(n1->dei_data, M_BUS);
 	free(n1, M_BUS);
 	return (rv);
 }
@@ -559,8 +550,7 @@
 	n1 = malloc(sizeof(*n1), M_BUS, flags);
 	if (n1 == NULL)
 		goto out;
-//	n1->dei_data = data;
-	n1->dei_data = strdup(data, M_BUS); //XXX
+	n1->dei_data = data;
 	mtx_lock(&devsoftc.mtx);
 	if (devctl_queue_length == 0) {
 		mtx_unlock(&devsoftc.mtx);


More information about the Zrouter-src-freebsd mailing list