diff options
author | scottl <scottl@FreeBSD.org> | 2014-07-01 06:23:48 +0000 |
---|---|---|
committer | scottl <scottl@FreeBSD.org> | 2014-07-01 06:23:48 +0000 |
commit | c80125f5779f0cd75c6574b1247237faca74e8ed (patch) | |
tree | dc1ac9fc1b978adc2bdc229556bb619902528f5f /sys/dev/isci/isci_controller.c | |
parent | c4c1c285482bb13854d4dc0b53d4c970a1237fc8 (diff) | |
download | FreeBSD-src-c80125f5779f0cd75c6574b1247237faca74e8ed.zip FreeBSD-src-c80125f5779f0cd75c6574b1247237faca74e8ed.tar.gz |
Merge r268024, 268025:
Fix a case in ndling ATA_PASSTHROUGH commands that have an unaligned buffer.
This impacts some home-rolled SMART tools.
In rare cases, a SATA drive can stop responding to commands and trigger a
reset device task request from the driver. If the drive fails to respond
with a signature FIS, the driver would previously get into an endless retry
loop, stalling all I/O to the drive and keeping user processes stranded.
Instead, fail the i/o and invalidate the device if the task management
command times out. This is controllable with the sysctl and tunable
hw.isci.fail_on_task_timeout
dev.isci.0.fail_on_task_timeout
The default for these is 1.
Obtained from: Netflix, Inc.
Diffstat (limited to 'sys/dev/isci/isci_controller.c')
-rw-r--r-- | sys/dev/isci/isci_controller.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/isci/isci_controller.c b/sys/dev/isci/isci_controller.c index 0760f34..f3ff082 100644 --- a/sys/dev/isci/isci_controller.c +++ b/sys/dev/isci/isci_controller.c @@ -300,6 +300,8 @@ SCI_STATUS isci_controller_initialize(struct ISCI_CONTROLLER *controller) SCI_CONTROLLER_HANDLE_T scic_controller_handle; char led_name[64]; unsigned long tunable; + uint32_t io_shortage; + uint32_t fail_on_timeout; int i; scic_controller_handle = @@ -365,10 +367,12 @@ SCI_STATUS isci_controller_initialize(struct ISCI_CONTROLLER *controller) * this io_shortage parameter, which will tell CAM that we have a * large queue depth than we really do. */ - uint32_t io_shortage = 0; + io_shortage = 0; TUNABLE_INT_FETCH("hw.isci.io_shortage", &io_shortage); controller->sim_queue_depth += io_shortage; + fail_on_timeout = 1; + TUNABLE_INT_FETCH("hw.isci.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. |