From owner-svn-src-all@FreeBSD.ORG Wed Dec 24 07:04:05 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 C8013B4E; Wed, 24 Dec 2014 07:04:05 +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 B3D5E2EBD; Wed, 24 Dec 2014 07:04:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBO745Al047211; Wed, 24 Dec 2014 07:04:05 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBO745Kh047209; Wed, 24 Dec 2014 07:04:05 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201412240704.sBO745Kh047209@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Wed, 24 Dec 2014 07:04:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276174 - head/sys/dev/isci X-SVN-Group: head 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: Wed, 24 Dec 2014 07:04:05 -0000 Author: scottl Date: Wed Dec 24 07:04:04 2014 New Revision: 276174 URL: https://svnweb.freebsd.org/changeset/base/276174 Log: Fix tunable and sysctl handling of the fail_on_task_timeout knob. Reviewed by: emax Obtained from: Netflix, Inc. MFC after: 3 days Modified: head/sys/dev/isci/isci_controller.c head/sys/dev/isci/isci_sysctl.c Modified: head/sys/dev/isci/isci_controller.c ============================================================================== --- head/sys/dev/isci/isci_controller.c Wed Dec 24 04:24:08 2014 (r276173) +++ head/sys/dev/isci/isci_controller.c Wed Dec 24 07:04:04 2014 (r276174) @@ -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: head/sys/dev/isci/isci_sysctl.c ============================================================================== --- head/sys/dev/isci/isci_sysctl.c Wed Dec 24 04:24:08 2014 (r276173) +++ head/sys/dev/isci/isci_sysctl.c Wed Dec 24 07:04:04 2014 (r276174) @@ -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++)