aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Long <scottl@FreeBSD.org>2014-12-24 07:04:04 +0000
committerScott Long <scottl@FreeBSD.org>2014-12-24 07:04:04 +0000
commit23059fc77f65beb33c08393cf81afcdc02f5bbd6 (patch)
treeb69c4fc96ba53373e75d1dd45f688c98e97df836
parente350f76c662d09a5c80c6d01b01949c678d2f947 (diff)
downloadsrc-23059fc77f65beb33c08393cf81afcdc02f5bbd6.tar.gz
src-23059fc77f65beb33c08393cf81afcdc02f5bbd6.zip
Fix tunable and sysctl handling of the fail_on_task_timeout knob.
Reviewed by: emax Obtained from: Netflix, Inc. MFC after: 3 days
Notes
Notes: svn path=/head/; revision=276174
-rw-r--r--sys/dev/isci/isci_controller.c2
-rw-r--r--sys/dev/isci/isci_sysctl.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/isci/isci_controller.c b/sys/dev/isci/isci_controller.c
index f3ff0825faf8..b0f42852dda1 100644
--- a/sys/dev/isci/isci_controller.c
+++ b/sys/dev/isci/isci_controller.c
@@ -373,6 +373,8 @@ SCI_STATUS isci_controller_initialize(struct ISCI_CONTROLLER *controller)
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.
diff --git a/sys/dev/isci/isci_sysctl.c b/sys/dev/isci/isci_sysctl.c
index 62a10b958901..a7c56c63233b 100644
--- a/sys/dev/isci/isci_sysctl.c
+++ b/sys/dev/isci/isci_sysctl.c
@@ -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++)