summaryrefslogtreecommitdiffstats
path: root/sys/dev/mps/mpsvar.h
diff options
context:
space:
mode:
authorken <ken@FreeBSD.org>2010-10-07 21:56:10 +0000
committerken <ken@FreeBSD.org>2010-10-07 21:56:10 +0000
commitaa3acd013b51f0e16ff13d9bbb843bcf0e3b1032 (patch)
tree0f0c1c5d641cac6a380bb6cb10401f7a9f5cb4e2 /sys/dev/mps/mpsvar.h
parentbd9a22a54ea3eebd6e9ce34ba6f339c76dae2c62 (diff)
downloadFreeBSD-src-aa3acd013b51f0e16ff13d9bbb843bcf0e3b1032.zip
FreeBSD-src-aa3acd013b51f0e16ff13d9bbb843bcf0e3b1032.tar.gz
Turn on serialization of task management commands going down to the
controller, but make it optional. After a problem report from Andrew Boyer, it looks like the LSI chip may have issues (the watchdog timer fired) if too many aborts are sent down to the chip at the same time. We know that task management commands are serialized, and although the manual doesn't say it, it may be a good idea to just send one at a time. But, since I'm not certain that this is necessary, add a tunable and sysctl variable (hw.mps.%d.allow_multiple_tm_cmds) to control the driver's behavior. mps.c: Add support for the sysctl and tunable, and add a comment about the possible return values to mps_map_command(). mps_sas.c: Run all task management commands through two new routines, mpssas_issue_tm_request() and mpssas_complete_tm_request(). This allows us to optionally serialize task management commands. Also, change things so that the response to a task management command always comes back through the callback. (Before it could come via the callback or the return value.) mpsvar.h: Add softc variables for the list of active task management commands, the number of active commands, and whether we should allow multiple active task management commands. Add an active command flag. mps.4: Describe the new sysctl/loader tunable variable. Sponsored by: Spectra Logic Corporation
Diffstat (limited to 'sys/dev/mps/mpsvar.h')
-rw-r--r--sys/dev/mps/mpsvar.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/mps/mpsvar.h b/sys/dev/mps/mpsvar.h
index 47489b9..cf27e5d 100644
--- a/sys/dev/mps/mpsvar.h
+++ b/sys/dev/mps/mpsvar.h
@@ -81,6 +81,7 @@ struct mps_command {
#define MPS_CM_FLAGS_DATAOUT (1 << 3)
#define MPS_CM_FLAGS_DATAIN (1 << 4)
#define MPS_CM_FLAGS_WAKEUP (1 << 5)
+#define MPS_CM_FLAGS_ACTIVE (1 << 6)
u_int cm_state;
#define MPS_CM_STATE_FREE 0
#define MPS_CM_STATE_BUSY 1
@@ -109,6 +110,8 @@ struct mps_softc {
#define MPS_FLAGS_BUSY (1 << 2)
#define MPS_FLAGS_SHUTDOWN (1 << 3)
u_int mps_debug;
+ u_int allow_multiple_tm_cmds;
+ int tm_cmds_active;
struct sysctl_ctx_list sysctl_ctx;
struct sysctl_oid *sysctl_tree;
struct mps_command *commands;
@@ -119,6 +122,7 @@ struct mps_softc {
TAILQ_HEAD(, mps_command) req_list;
TAILQ_HEAD(, mps_chain) chain_list;
+ TAILQ_HEAD(, mps_command) tm_list;
int replypostindex;
int replyfreeindex;
int replycurindex;
OpenPOWER on IntegriCloud