Lines Matching defs:state
15 * This state machine is taken from the state machine in the IPMI spec,
33 * KCS_DEBUG_STATES - state machine
51 * was added to the state machine in the spec to wait for the
73 * the state machine in the spec to be sure IBF was there.
95 /* The hardware failed to follow the state machine. */
109 enum kcs_states state;
128 kcs->state = KCS_IDLE;
194 kcs->state = KCS_HOSED;
197 kcs->state = KCS_ERROR0;
257 kcs->state = KCS_WAIT_WRITE_START;
273 if ((kcs->state != KCS_IDLE) && (kcs->state != KCS_HOSED)) {
274 dev_warn(kcs->io->dev, "KCS in invalid state %d\n", kcs->state);
290 kcs->state = KCS_START_OP;
326 * This implements the state machine defined in the IPMI manual, see
333 unsigned char state;
339 "KCS: State = %d, %x\n", kcs->state, status);
345 /* Just about everything looks at the KCS state, so grab that, too. */
346 state = GET_STATUS_STATE(status);
348 switch (kcs->state) {
359 if (state != KCS_IDLE_STATE) {
367 kcs->state = KCS_WAIT_WRITE_START;
371 if (state != KCS_WRITE_STATE) {
374 "Not in write state at write start");
380 kcs->state = KCS_WAIT_WRITE_END;
383 kcs->state = KCS_WAIT_WRITE;
388 if (state != KCS_WRITE_STATE) {
390 "Not in write state for write");
396 kcs->state = KCS_WAIT_WRITE_END;
403 if (state != KCS_WRITE_STATE) {
405 "Not in write state"
411 kcs->state = KCS_WAIT_READ;
415 if ((state != KCS_READ_STATE) && (state != KCS_IDLE_STATE)) {
418 "Not in read or idle in read state");
422 if (state == KCS_READ_STATE) {
428 * We don't implement this exactly like the state
433 * handle clearing out obf in idle state if it
438 kcs->state = KCS_IDLE;
451 kcs->state = KCS_ERROR1;
457 kcs->state = KCS_ERROR2;
461 if (state != KCS_READ_STATE) {
463 "Not in read state for error2");
471 kcs->state = KCS_ERROR3;
475 if (state != KCS_IDLE_STATE) {
477 "Not in idle state for error3");
488 kcs->state = KCS_IDLE;
497 if (kcs->state == KCS_HOSED) {