After a massive print debugging, I found where the
problem appears.

In /sys/src/9/bitsy/wavelan.c, in the function w_cmd():

if(i==WTmOut){
    /*
     * WCmdIni can take a really long time.
     */
    enum { IniTmOut = 2000 };
    for(i=0; i<IniTmOut; i++){
        if(csr_ins(ctlr, WR_EvSts)&WCmdEv)
            break;
        microdelay(100);
    }
    if(i < IniTmOut)
        if(0) print("#l%d: long cmd %.4ux %d\n",
                     ctlr->ctlrno, cmd, i);
    if(i == IniTmOut){
        print("#l%d: execing cmd %.4ux: %.4ux\n",
               ctlr->ctlrno, cmd, csr_ins(ctlr, WR_EvSts));
        return -1;
    }
}

w_cmd() is returning -1.

The preceding print displays (with some junk in):

#l0: execing cmd 0000: 0000

Can this be a hardware problem?

Thank you.

-- 
David du Colombier

Reply via email to