Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Dec 2014 07:04:05 +0000 (UTC)
From:      Scott Long <scottl@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r276174 - head/sys/dev/isci
Message-ID:  <201412240704.sBO745Kh047209@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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++)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201412240704.sBO745Kh047209>