[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>
这个提交包含在:
Dan Williams
2012-02-10 01:18:44 -08:00
提交者 James Bottomley
父节点 16d3db1b29
当前提交 d7a0ccdd9b
修改 10 个文件,包含 432 行新增520 行删除

查看文件

@@ -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
/**
*