if (csr & EACSR_CMDCMPL) {
rp = (NOCT_READ_4(sc, NOCT_EA_Q_PTR) & EAQPTR_READ_M) >> EAQPTR_READ_S; while (sc->sc_earp != rp) { if (SIMPLEQ_EMPTY(&sc->sc_chipq)) panic("%s: empty chipq", sc->sc_dv.dv_xname); q = SIMPLEQ_FIRST(&sc->sc_chipq); SIMPLEQ_REMOVE_HEAD(&sc->sc_chipq, q, q_next); SIMPLEQ_INSERT_TAIL(&sc->sc_outq, q, q_next); bcopy((u_int8_t *)&sc->sc_eacmd[sc->sc_earp].buf[6], q->q_macbuf, 20); NOCT_WAKEUP(sc); if (++sc->sc_earp == NOCT_EA_ENTRIES) sc->sc_earp = 0;
noct_ea_intr(sc)	struct noct_softc *sc;{	u_int32_t csr;	csr = NOCT_READ_4(sc, NOCT_EA_CSR);	NOCT_WRITE_4(sc, NOCT_EA_CSR, csr |	    EACSR_QALIGN | EACSR_CMDCMPL | EACSR_OPERR | EACSR_CMDREAD |	    EACSR_CMDWRITE | EACSR_DATAREAD | EACSR_DATAWRITE |	    EACSR_INTRNLLEN | EACSR_EXTRNLLEN | EACSR_DESBLOCK |	    EACSR_DESKEY | EACSR_ILL);	if (csr & EACSR_CMDCMPL) {		/* command completed... */	}	if (csr & EACSR_QALIGN)		printf("%s: ea bad queue alignment\n", sc->sc_dv.dv_xname);	if (csr & EACSR_OPERR)		printf("%s: ea bad opcode\n", sc->sc_dv.dv_xname);	if (csr & EACSR_CMDREAD)		printf("%s: ea command read error\n", sc->sc_dv.dv_xname);	if (csr & EACSR_CMDWRITE)		printf("%s: ea command write error\n", sc->sc_dv.dv_xname);	if (csr & EACSR_DATAREAD)		printf("%s: ea data read error\n", sc->sc_dv.dv_xname);	if (csr & EACSR_DATAWRITE)		printf("%s: ea data write error\n", sc->sc_dv.dv_xname);	if (csr & EACSR_INTRNLLEN)		printf("%s: ea bad internal len\n", sc->sc_dv.dv_xname);	if (csr & EACSR_EXTRNLLEN)		printf("%s: ea bad external len\n", sc->sc_dv.dv_xname);	if (csr & EACSR_DESBLOCK)		printf("%s: ea bad des block\n", sc->sc_dv.dv_xname);	if (csr & EACSR_DESKEY)		printf("%s: ea bad des key\n", sc->sc_dv.dv_xname);	if (csr & EACSR_ILL)		printf("%s: ea illegal access\n", sc->sc_dv.dv_xname);}