} while ( (asr & SBIC_ASR_INT) == 0 && wait-- > 0 );  SBIC_TC_GET(regs, len); SBIC_TC_PUT(regs, 0);
} while ( len && (asr & SBIC_ASR_INT) == 0 && wait-- > 0 );
sbicxfout(regs, len, bp)    sbic_regmap_p   regs;    int             len;    void            *bp;{    int     wait = sbic_data_wait;    u_char  asr,            *buf = bp;    QPRINTF(("sbicxfout {%d} %02x %02x %02x %02x %02x "        "%02x %02x %02x %02x %02x\n", len, buf[0], buf[1], buf[2],        buf[3], buf[4], buf[5], buf[6], buf[7], buf[8], buf[9]));    /*     * sigh.. WD-PROTO strikes again.. sending the command in one go     * causes the chip to lock up if talking to certain (misbehaving?)     * targets. Anyway, this procedure should work for all targets, but     * it's slightly slower due to the overhead     */    WAIT_CIP (regs);    SBIC_TC_PUT (regs, 0);    SET_SBIC_control(regs, SBIC_CTL_EDI | SBIC_CTL_IDI);    SBIC_TC_PUT (regs, (unsigned)len);    SET_SBIC_cmd (regs, SBIC_CMD_XFER_INFO);    /*     * Loop for each byte transferred     */    do {        GET_SBIC_asr (regs, asr);        if ( asr & SBIC_ASR_DBR ) {            if ( len ) {                SET_SBIC_data (regs, *buf);                buf++;                len--;            } else {                SET_SBIC_data (regs, 0);            }            wait = sbic_data_wait;        }    } while ( (asr & SBIC_ASR_INT) == 0 && wait-- > 0 );    SBIC_TC_GET(regs, len);    SBIC_TC_PUT(regs, 0);#ifdef  DEBUG    QPRINTF(("sbicxfout done: %d bytes remaining (wait:%d)\n", len, wait));#endif    /*     * this leaves with one csr to be read     */    return(len);}