diff options
author | Corey Minyard <cminyard@mvista.com> | 2008-04-29 04:01:08 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-29 11:06:15 -0400 |
commit | ba8ff1c61eb119e687b06ca35f7f4ab041bf0422 (patch) | |
tree | ca90a737973edc3a11e4ec9cd2f68ac02ebb96af /drivers | |
parent | 64959e2d47dead81c6e3ce4864d629d6375e07e2 (diff) |
IPMI: Convert system interface defines to an enum
Convert the #defines for statistics into an enum in the IPMI system interface
and remove the unused timeout_restart statistic. And comment what these
statistics mean.
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/ipmi/ipmi_si_intf.c | 60 |
1 files changed, 43 insertions, 17 deletions
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index 286c042a0c66..ba7e75b731c6 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c | |||
@@ -124,22 +124,50 @@ static struct device_driver ipmi_driver = | |||
124 | /* | 124 | /* |
125 | * Indexes into stats[] in smi_info below. | 125 | * Indexes into stats[] in smi_info below. |
126 | */ | 126 | */ |
127 | enum si_stat_indexes { | ||
128 | /* | ||
129 | * Number of times the driver requested a timer while an operation | ||
130 | * was in progress. | ||
131 | */ | ||
132 | SI_STAT_short_timeouts = 0, | ||
133 | |||
134 | /* | ||
135 | * Number of times the driver requested a timer while nothing was in | ||
136 | * progress. | ||
137 | */ | ||
138 | SI_STAT_long_timeouts, | ||
139 | |||
140 | /* Number of times the interface was idle while being polled. */ | ||
141 | SI_STAT_idles, | ||
142 | |||
143 | /* Number of interrupts the driver handled. */ | ||
144 | SI_STAT_interrupts, | ||
145 | |||
146 | /* Number of time the driver got an ATTN from the hardware. */ | ||
147 | SI_STAT_attentions, | ||
127 | 148 | ||
128 | #define SI_STAT_short_timeouts 0 | 149 | /* Number of times the driver requested flags from the hardware. */ |
129 | #define SI_STAT_long_timeouts 1 | 150 | SI_STAT_flag_fetches, |
130 | #define SI_STAT_timeout_restarts 2 | 151 | |
131 | #define SI_STAT_idles 3 | 152 | /* Number of times the hardware didn't follow the state machine. */ |
132 | #define SI_STAT_interrupts 4 | 153 | SI_STAT_hosed_count, |
133 | #define SI_STAT_attentions 5 | 154 | |
134 | #define SI_STAT_flag_fetches 6 | 155 | /* Number of completed messages. */ |
135 | #define SI_STAT_hosed_count 7 | 156 | SI_STAT_complete_transactions, |
136 | #define SI_STAT_complete_transactions 8 | 157 | |
137 | #define SI_STAT_events 9 | 158 | /* Number of IPMI events received from the hardware. */ |
138 | #define SI_STAT_watchdog_pretimeouts 10 | 159 | SI_STAT_events, |
139 | #define SI_STAT_incoming_messages 11 | 160 | |
140 | 161 | /* Number of watchdog pretimeouts. */ | |
141 | /* If you add a stat, you must update this value. */ | 162 | SI_STAT_watchdog_pretimeouts, |
142 | #define SI_NUM_STATS 12 | 163 | |
164 | /* Number of asyncronous messages received. */ | ||
165 | SI_STAT_incoming_messages, | ||
166 | |||
167 | |||
168 | /* This *must* remain last, add new values above this. */ | ||
169 | SI_NUM_STATS | ||
170 | }; | ||
143 | 171 | ||
144 | struct smi_info | 172 | struct smi_info |
145 | { | 173 | { |
@@ -2399,8 +2427,6 @@ static int stat_file_read_proc(char *page, char **start, off_t off, | |||
2399 | smi_get_stat(smi, short_timeouts)); | 2427 | smi_get_stat(smi, short_timeouts)); |
2400 | out += sprintf(out, "long_timeouts: %u\n", | 2428 | out += sprintf(out, "long_timeouts: %u\n", |
2401 | smi_get_stat(smi, long_timeouts)); | 2429 | smi_get_stat(smi, long_timeouts)); |
2402 | out += sprintf(out, "timeout_restarts: %u\n", | ||
2403 | smi_get_stat(smi, timeout_restarts)); | ||
2404 | out += sprintf(out, "idles: %u\n", | 2430 | out += sprintf(out, "idles: %u\n", |
2405 | smi_get_stat(smi, idles)); | 2431 | smi_get_stat(smi, idles)); |
2406 | out += sprintf(out, "interrupts: %u\n", | 2432 | out += sprintf(out, "interrupts: %u\n", |