Lines Matching refs:state
57 efx->state = STATE_DISABLED;
818 enum ef100_tlv_state_machine state;
825 static int ef100_tlv_feed(struct ef100_tlv_state *state, u8 byte)
827 switch (state->state) {
829 state->type = byte & 0x7f;
830 state->state = (byte & 0x80) ? EF100_TLV_TYPE_CONT
833 state->value = 0;
834 state->value_offset = 0;
837 state->type |= byte << 7;
838 state->state = EF100_TLV_LENGTH;
841 state->len = byte;
843 if (state->len > sizeof(state->value))
846 state->state = state->len ? EF100_TLV_VALUE : EF100_TLV_TYPE;
849 state->value |= ((u64)byte) << (state->value_offset * 8);
850 state->value_offset++;
851 if (state->value_offset >= state->len)
852 state->state = EF100_TLV_TYPE;
854 default: /* state machine error, can't happen */
988 if (!rc && reader.state == EF100_TLV_TYPE)
998 * and our state machine is out of sync.
1000 if (reader.state != EF100_TLV_TYPE) {
1001 if (reader.state == EF100_TLV_TYPE_CONT)