Lines Matching refs:state
53 efx->state = STATE_DISABLED;
892 enum ef100_tlv_state_machine state;
899 static int ef100_tlv_feed(struct ef100_tlv_state *state, u8 byte)
901 switch (state->state) {
903 state->type = byte & 0x7f;
904 state->state = (byte & 0x80) ? EF100_TLV_TYPE_CONT
907 state->value = 0;
908 state->value_offset = 0;
911 state->type |= byte << 7;
912 state->state = EF100_TLV_LENGTH;
915 state->len = byte;
917 if (state->len > sizeof(state->value))
920 state->state = state->len ? EF100_TLV_VALUE : EF100_TLV_TYPE;
923 state->value |= ((u64)byte) << (state->value_offset * 8);
924 state->value_offset++;
925 if (state->value_offset >= state->len)
926 state->state = EF100_TLV_TYPE;
928 default: /* state machine error, can't happen */
1060 if (!rc && reader.state == EF100_TLV_TYPE)
1070 * and our state machine is out of sync.
1072 if (reader.state != EF100_TLV_TYPE) {
1073 if (reader.state == EF100_TLV_TYPE_CONT)