From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 23:18:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 50E06F6F; Fri, 26 Dec 2014 23:18:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B51F6622B; Fri, 26 Dec 2014 23:18:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQNIBYo087259; Fri, 26 Dec 2014 23:18:11 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQNIAlf087254; Fri, 26 Dec 2014 23:18:10 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201412262318.sBQNIAlf087254@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Fri, 26 Dec 2014 23:18:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276269 - stable/10/sys/dev/isci X-SVN-Group: stable-10 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.18-1 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: Fri, 26 Dec 2014 23:18:11 -0000 Author: scottl Date: Fri Dec 26 23:18:09 2014 New Revision: 276269 URL: https://svnweb.freebsd.org/changeset/base/276269 Log: MFC 276174: Fix tunable and sysctl handling of the fail_on_task_timeout knob. Reviewed by: emax Obtained from: Netflix, Inc. Modified: stable/10/sys/dev/isci/isci_controller.c stable/10/sys/dev/isci/isci_sysctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isci/isci_controller.c ============================================================================== --- stable/10/sys/dev/isci/isci_controller.c Fri Dec 26 22:56:02 2014 (r276268) +++ stable/10/sys/dev/isci/isci_controller.c Fri Dec 26 23:18:09 2014 (r276269) @@ -373,6 +373,8 @@ SCI_STATUS isci_controller_initialize(st fail_on_timeout = 1; TUNABLE_INT_FETCH("hw.isci.fail_on_task_timeout", &fail_on_timeout); + controller->fail_on_task_timeout = fail_on_timeout; + /* Attach to CAM using xpt_bus_register now, then immediately freeze * the simq. It will get released later when initial domain discovery * is complete. Modified: stable/10/sys/dev/isci/isci_sysctl.c ============================================================================== --- stable/10/sys/dev/isci/isci_sysctl.c Fri Dec 26 22:56:02 2014 (r276268) +++ stable/10/sys/dev/isci/isci_sysctl.c Fri Dec 26 23:18:09 2014 (r276269) @@ -226,12 +226,13 @@ static int isci_sysctl_fail_on_task_timeout(SYSCTL_HANDLER_ARGS) { struct isci_softc *isci = (struct isci_softc *)arg1; - int32_t fail_on_timeout = 0; + int32_t fail_on_timeout; int error, i; + fail_on_timeout = isci->controllers[0].fail_on_task_timeout; error = sysctl_handle_int(oidp, &fail_on_timeout, 0, req); - if (error || fail_on_timeout == 0) + if (error || req->newptr == NULL) return (error); for (i = 0; i < isci->controller_count; i++)