aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ioat/ioat_hw.h
diff options
context:
space:
mode:
authorConrad Meyer <cem@FreeBSD.org>2015-10-31 20:38:06 +0000
committerConrad Meyer <cem@FreeBSD.org>2015-10-31 20:38:06 +0000
commitfaefad9c125a9478dd46ccadd0b20a2c825de803 (patch)
treef60b5af17308168bbe0df04d1b3dc94dd38c0e56 /sys/dev/ioat/ioat_hw.h
parent25a984748cf92f173499fac132bdcb42a52bc264 (diff)
downloadsrc-faefad9c125a9478dd46ccadd0b20a2c825de803.tar.gz
src-faefad9c125a9478dd46ccadd0b20a2c825de803.zip
ioat: Handle channel-fatal HW errors safely
Certain invalid operations trigger hardware error conditions. Error conditions that only halt one channel can be detected and recovered by resetting the channel. Error conditions that halt the whole device are generally not recoverable. Add a sysctl to inject channel-fatal HW errors, 'dev.ioat.<N>.force_hw_error=1'. When a halt due to a channel error is detected, ioat(4) blocks new operations from being queued on the channel, completes any outstanding operations with an error status, and resets the channel before allowing new operations to be queued again. Update ioat.4 to document error recovery; document blockfill introduced in r290021 while we are here; document ioat_put_dmaengine() added in r289907; document DMA_NO_WAIT added in r289982. Sponsored by: EMC / Isilon Storage Division
Notes
Notes: svn path=/head/; revision=290229
Diffstat (limited to 'sys/dev/ioat/ioat_hw.h')
-rw-r--r--sys/dev/ioat/ioat_hw.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/ioat/ioat_hw.h b/sys/dev/ioat/ioat_hw.h
index 99b8d3e88aba..43c78caeb189 100644
--- a/sys/dev/ioat/ioat_hw.h
+++ b/sys/dev/ioat/ioat_hw.h
@@ -81,7 +81,9 @@ __FBSDID("$FreeBSD$");
#define IOAT_CHANCTRL_ERR_COMPLETION_EN 0x0004
#define IOAT_CHANCTRL_INT_REARM 0x0001
#define IOAT_CHANCTRL_RUN (IOAT_CHANCTRL_INT_REARM |\
- IOAT_CHANCTRL_ANY_ERR_ABORT_EN)
+ IOAT_CHANCTRL_ERR_COMPLETION_EN |\
+ IOAT_CHANCTRL_ANY_ERR_ABORT_EN |\
+ IOAT_CHANCTRL_ERR_INT_EN)
#define IOAT_CHANCMD_OFFSET 0x84
#define IOAT_CHANCMD_RESET 0x20
@@ -98,6 +100,7 @@ __FBSDID("$FreeBSD$");
#define IOAT_CHANSTS_IDLE 0x1
#define IOAT_CHANSTS_SUSPENDED 0x2
#define IOAT_CHANSTS_HALTED 0x3
+#define IOAT_CHANSTS_ARMED 0x4
#define IOAT_CHANSTS_UNAFFILIATED_ERROR 0x8ULL
#define IOAT_CHANSTS_SOFT_ERROR 0x10ULL