From owner-svn-src-all@freebsd.org Sat Aug 22 19:02:16 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5EDB73C2FE6; Sat, 22 Aug 2020 19:02:16 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BYnnN1pNQz3SsM; Sat, 22 Aug 2020 19:02:16 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2140C1AF24; Sat, 22 Aug 2020 19:02:16 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07MJ2Ghv065543; Sat, 22 Aug 2020 19:02:16 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07MJ2FgE065542; Sat, 22 Aug 2020 19:02:15 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202008221902.07MJ2FgE065542@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 22 Aug 2020 19:02:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364490 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 364490 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Aug 2020 19:02:16 -0000 Author: imp Date: Sat Aug 22 19:02:15 2020 New Revision: 364490 URL: https://svnweb.freebsd.org/changeset/base/364490 Log: Retire obsolete sysctl hw.bus.devctl_disable hw.bus.devctl_disable has tagged been obsolete for a decade. Remove it. Also remove some long obsolete comments. This was done and backed out once in 2014, but we've had enough releases with the 'new' method of setting queue length that we can just remove this sysctl now (stable/11, stable/12 and current all don't reference it). Modified: head/sys/kern/subr_bus.c Modified: head/sys/kern/subr_bus.c ============================================================================== --- head/sys/kern/subr_bus.c Sat Aug 22 18:14:05 2020 (r364489) +++ head/sys/kern/subr_bus.c Sat Aug 22 19:02:15 2020 (r364490) @@ -365,22 +365,9 @@ device_sysctl_fini(device_t dev) * * Also note: we specifically do not attach a device to the device_t tree * to avoid potential chicken and egg problems. One could argue that all - * of this belongs to the root node. One could also further argue that the - * sysctl interface that we have not might more properly be an ioctl - * interface, but at this stage of the game, I'm not inclined to rock that - * boat. - * - * I'm also not sure that the SIGIO support is done correctly or not, as - * I copied it from a driver that had SIGIO support that likely hasn't been - * tested since 3.4 or 2.2.8! + * of this belongs to the root node. */ -/* Deprecated way to adjust queue length */ -static int sysctl_devctl_disable(SYSCTL_HANDLER_ARGS); -SYSCTL_PROC(_hw_bus, OID_AUTO, devctl_disable, CTLTYPE_INT | CTLFLAG_RWTUN | - CTLFLAG_MPSAFE, NULL, 0, sysctl_devctl_disable, "I", - "devctl disable -- deprecated"); - #define DEVCTL_DEFAULT_QUEUE_LEN 1000 static int sysctl_devctl_queue(SYSCTL_HANDLER_ARGS); static int devctl_queue_length = DEVCTL_DEFAULT_QUEUE_LEN; @@ -796,35 +783,6 @@ static void devnomatch(device_t dev) { devaddq("?", "", dev); -} - -static int -sysctl_devctl_disable(SYSCTL_HANDLER_ARGS) -{ - struct dev_event_info *n1; - int dis, error; - - dis = (devctl_queue_length == 0); - error = sysctl_handle_int(oidp, &dis, 0, req); - if (error || !req->newptr) - return (error); - if (mtx_initialized(&devsoftc.mtx)) - mtx_lock(&devsoftc.mtx); - if (dis) { - while (!STAILQ_EMPTY(&devsoftc.devq)) { - n1 = STAILQ_FIRST(&devsoftc.devq); - STAILQ_REMOVE_HEAD(&devsoftc.devq, dei_link); - free(n1->dei_data, M_BUS); - free(n1, M_BUS); - } - devsoftc.queued = 0; - devctl_queue_length = 0; - } else { - devctl_queue_length = DEVCTL_DEFAULT_QUEUE_LEN; - } - if (mtx_initialized(&devsoftc.mtx)) - mtx_unlock(&devsoftc.mtx); - return (0); } static int