bzero(acb, sizeof(sc->sc_acb)); for (i = 0; i < sizeof(sc->sc_acb) / sizeof(*acb); i++) {
bzero(acb, sizeof(struct siop_acb) * SIOP_NACB); for (i = 0; i < SIOP_NACB; i++) {
siopreset(sc)	struct siop_softc *sc;{	siop_regmap_p rp;	u_int i, s;	u_char  dummy;	struct siop_acb *acb;	rp = sc->sc_siopp;	if (sc->sc_flags & SIOP_ALIVE)		siopabort(sc, rp, "reset");	s = splbio();	/*	 * Reset the chip	 * XXX - is this really needed?	 */	rp->siop_istat |= SIOP_ISTAT_ABRT;	/* abort current script */	rp->siop_istat |= SIOP_ISTAT_RST;		/* reset chip */	rp->siop_istat &= ~SIOP_ISTAT_RST;	/*	 * Reset SCSI bus (do we really want this?)	 */	rp->siop_sien = 0;	rp->siop_scntl1 |= SIOP_SCNTL1_RST;	delay(1);	rp->siop_scntl1 &= ~SIOP_SCNTL1_RST;	/*	 * Set up various chip parameters	 */	rp->siop_scntl0 = SIOP_ARB_FULL | SIOP_SCNTL0_EPC | SIOP_SCNTL0_EPG;	rp->siop_scntl1 = SIOP_SCNTL1_ESR;	rp->siop_dcntl = sc->sc_dcntl;	rp->siop_dmode = 0x80;	/* burst length = 4 */	rp->siop_sien = 0x00;	/* don't enable interrupts yet */	rp->siop_dien = 0x00;	/* don't enable interrupts yet */	rp->siop_scid = 1 << sc->sc_link.adapter_target;	rp->siop_dwt = 0x00;	rp->siop_ctest0 |= SIOP_CTEST0_BTD | SIOP_CTEST0_EAN;	rp->siop_ctest7 = sc->sc_ctest7;	/* will need to re-negotiate sync xfers */	bzero(&sc->sc_sync, sizeof (sc->sc_sync));	i = rp->siop_istat;	if (i & SIOP_ISTAT_SIP)		dummy = rp->siop_sstat0;	if (i & SIOP_ISTAT_DIP)		dummy = rp->siop_dstat;	splx(s);	delay(siop_reset_delay * 1000);	printf(": version %d target %d\n", rp->siop_ctest8 >> 4,	    sc->sc_link.adapter_target);	if ((sc->sc_flags & SIOP_ALIVE) == 0) {		TAILQ_INIT(&sc->ready_list);		TAILQ_INIT(&sc->nexus_list);		TAILQ_INIT(&sc->free_list);		sc->sc_nexus = NULL;		acb = sc->sc_acb;		bzero(acb, sizeof(sc->sc_acb));		for (i = 0; i < sizeof(sc->sc_acb) / sizeof(*acb); i++) {			TAILQ_INSERT_TAIL(&sc->free_list, acb, chain);			acb++;		}		bzero(sc->sc_tinfo, sizeof(sc->sc_tinfo));	} else {		if (sc->sc_nexus != NULL) {			sc->sc_nexus->xs->error = XS_DRIVER_STUFFUP;			siop_scsidone(sc->sc_nexus, sc->sc_nexus->stat[0]);		}		while (acb = sc->nexus_list.tqh_first) {			acb->xs->error = XS_DRIVER_STUFFUP;			siop_scsidone(acb, acb->stat[0]);		}	}	sc->sc_flags |= SIOP_ALIVE;	sc->sc_flags &= ~(SIOP_INTDEFER|SIOP_INTSOFF);	/* enable SCSI and DMA interrupts */	sc->sc_sien = SIOP_SIEN_M_A | SIOP_SIEN_STO | /*SIOP_SIEN_SEL |*/ SIOP_SIEN_SGE |	    SIOP_SIEN_UDC | SIOP_SIEN_RST | SIOP_SIEN_PAR;	sc->sc_dien = SIOP_DIEN_BF | SIOP_DIEN_ABRT | SIOP_DIEN_SIR |	    /*SIOP_DIEN_WTD |*/ SIOP_DIEN_IID;	rp->siop_sien = sc->sc_sien;	rp->siop_dien = sc->sc_dien;}