diff options
author | Dan Williams <dan.j.williams@intel.com> | 2012-02-10 04:18:44 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-02-29 17:23:15 -0500 |
commit | d7a0ccdd9bd78b5b74d2963ec7ab67c9d896902a (patch) | |
tree | 9fc59d3303e7453006c767b0f4daadbf3d4ed5c1 /drivers/scsi/isci/remote_node_context.c | |
parent | 16d3db1b298529e6aec4a4cf0f56225d9e0bc641 (diff) |
[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 @@ | |||
60 | #include "scu_event_codes.h" | 60 | #include "scu_event_codes.h" |
61 | #include "scu_task_context.h" | 61 | #include "scu_task_context.h" |
62 | 62 | ||
63 | #undef C | ||
64 | #define C(a) (#a) | ||
65 | const char *rnc_state_name(enum scis_sds_remote_node_context_states state) | ||
66 | { | ||
67 | static const char * const strings[] = RNC_STATES; | ||
63 | 68 | ||
64 | /** | 69 | return strings[state]; |
65 | * | 70 | } |
66 | * @sci_rnc: The RNC for which the is posted request is being made. | 71 | #undef C |
67 | * | ||
68 | * This method will return true if the RNC is not in the initial state. In all | ||
69 | * other states the RNC is considered active and this will return true. The | ||
70 | * destroy request of the state machine drives the RNC back to the initial | ||
71 | * state. If the state machine changes then this routine will also have to be | ||
72 | * changed. bool true if the state machine is not in the initial state false if | ||
73 | * the state machine is in the initial state | ||
74 | */ | ||
75 | 72 | ||
76 | /** | 73 | /** |
77 | * | 74 | * |