diff options
author | Dan Williams <dan.j.williams@intel.com> | 2012-02-10 01:18:44 -0800 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-02-29 16:23:15 -0600 |
commit | d7a0ccdd9bd78b5b74d2963ec7ab67c9d896902a (patch) | |
tree | 9fc59d3303e7453006c767b0f4daadbf3d4ed5c1 /drivers/scsi/isci/remote_node_context.c | |
parent | 16d3db1b298529e6aec4a4cf0f56225d9e0bc641 (diff) | |
download | talos-op-linux-d7a0ccdd9bd78b5b74d2963ec7ab67c9d896902a.tar.gz talos-op-linux-d7a0ccdd9bd78b5b74d2963ec7ab67c9d896902a.zip |
[SCSI] isci: debug, provide state-enum-to-string conversions
Debugging the driver requires tracing the state transtions and tracing
state names is less work than decoding numbers.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/isci/remote_node_context.c')
-rw-r--r-- | drivers/scsi/isci/remote_node_context.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/scsi/isci/remote_node_context.c b/drivers/scsi/isci/remote_node_context.c index 748e8339d1ec..3a9463481f38 100644 --- a/drivers/scsi/isci/remote_node_context.c +++ b/drivers/scsi/isci/remote_node_context.c @@ -60,18 +60,15 @@ #include "scu_event_codes.h" #include "scu_task_context.h" +#undef C +#define C(a) (#a) +const char *rnc_state_name(enum scis_sds_remote_node_context_states state) +{ + static const char * const strings[] = RNC_STATES; -/** - * - * @sci_rnc: The RNC for which the is posted request is being made. - * - * This method will return true if the RNC is not in the initial state. In all - * other states the RNC is considered active and this will return true. The - * destroy request of the state machine drives the RNC back to the initial - * state. If the state machine changes then this routine will also have to be - * changed. bool true if the state machine is not in the initial state false if - * the state machine is in the initial state - */ + return strings[state]; +} +#undef C /** * |