Lines Matching defs:sts
572 int sts, v;
575 sts = smic_wait(sc, SMIC_TX_DATA_RDY | SMIC_BUSY, SMIC_TX_DATA_RDY,
577 if (sts < 0)
578 return sts;
594 int sts;
596 sts = smic_wait(sc, SMIC_RX_DATA_RDY | SMIC_BUSY, SMIC_RX_DATA_RDY,
598 if (sts >= 0) {
602 return sts;
610 int sts, idx;
612 sts = smic_write_cmd_data(sc, SMS_CC_START_TRANSFER, &data[0]);
613 ErrStat(sts != SMS_SC_WRITE_START, "%s: wstart", __func__);
615 sts = smic_write_cmd_data(sc, SMS_CC_NEXT_TRANSFER,
617 ErrStat(sts != SMS_SC_WRITE_NEXT, "%s: write", __func__);
619 sts = smic_write_cmd_data(sc, SMS_CC_END_TRANSFER, &data[idx]);
620 if (sts != SMS_SC_WRITE_END) {
621 dbg_printf(50, "%s: %d/%d = %#.2x\n", __func__, idx, len, sts);
631 int sts, idx;
634 sts = smic_wait(sc, SMIC_RX_DATA_RDY, SMIC_RX_DATA_RDY, __func__);
635 if (sts < 0)
638 sts = smic_write_cmd_data(sc, SMS_CC_START_RECEIVE, NULL);
639 ErrStat(sts != SMS_SC_READ_START, "%s: rstart", __func__);
641 sts = smic_read_data(sc, &data[idx++]);
642 if (sts != SMS_SC_READ_START && sts != SMS_SC_READ_NEXT)
646 ErrStat(sts != SMS_SC_READ_END, "%s: rend", __func__);
650 sts = smic_write_cmd_data(sc, SMS_CC_END_RECEIVE, NULL);
651 if (sts != SMS_SC_READY) {
653 __func__, idx, maxlen, sts);
754 int sts;
756 sts = kcs_wait(sc, KCS_IBF | KCS_OBF, KCS_OBF, __func__);
757 if (sts != KCS_READ_STATE)
758 return sts;
766 return sts;
773 int idx, sts;
777 sts = kcs_write_cmd(sc, KCS_WRITE_START);
780 sts = kcs_write_cmd(sc, KCS_WRITE_END);
782 if (sts != KCS_WRITE_STATE)
785 sts = kcs_write_data(sc, data[idx]);
787 if (sts != KCS_READ_STATE) {
788 dbg_printf(1, "%s: %d/%d <%#.2x>\n", __func__, idx, len, sts);
799 int idx, sts;
802 sts = kcs_read_data(sc, &data[idx]);
803 if (sts != KCS_READ_STATE)
806 sts = kcs_wait(sc, KCS_IBF, 0, __func__);
808 if (sts != KCS_IDLE_STATE) {
810 __func__, idx, maxlen, sts);