sc->sc_script[j] = htole32(siop_script[j]);
sc->sc_c.sc_script[j] = htole32(siop_script[j]);
siop_reset(sc)	struct siop_softc *sc;{	int i, j;	struct siop_lunsw *lunsw;	siop_common_reset(sc);	/* copy and patch the script */	if (sc->features & SF_CHIP_RAM) {		bus_space_write_region_4(sc->sc_ramt, sc->sc_ramh, 0,		    siop_script, sizeof(siop_script) / sizeof(siop_script[0]));		for (j = 0; j <		    (sizeof(E_abs_msgin_Used) / sizeof(E_abs_msgin_Used[0]));		    j++) {			bus_space_write_4(sc->sc_ramt, sc->sc_ramh,			    E_abs_msgin_Used[j] * 4,			    sc->sc_scriptaddr + Ent_msgin_space);		}	} else {		for (j = 0;		    j < (sizeof(siop_script) / sizeof(siop_script[0])); j++) {			sc->sc_script[j] = htole32(siop_script[j]);		}		for (j = 0; j <		    (sizeof(E_abs_msgin_Used) / sizeof(E_abs_msgin_Used[0]));		    j++) {			sc->sc_script[E_abs_msgin_Used[j]] =			    htole32(sc->sc_scriptaddr + Ent_msgin_space);		}	}	sc->script_free_lo = sizeof(siop_script) / sizeof(siop_script[0]);	sc->script_free_hi = sc->ram_size / 4;	/* free used and unused lun switches */	while((lunsw = TAILQ_FIRST(&sc->lunsw_list)) != NULL) {#ifdef SIOP_DEBUG		printf("%s: free lunsw at offset %d\n",				sc->sc_dev.dv_xname, lunsw->lunsw_off);#endif		TAILQ_REMOVE(&sc->lunsw_list, lunsw, next);		free(lunsw, M_DEVBUF);	}	TAILQ_INIT(&sc->lunsw_list);	/* restore reselect switch */	for (i = 0; i < sc->sc_link.adapter_buswidth; i++) {		if (sc->targets[i] == NULL)			continue;#ifdef SIOP_DEBUG		printf("%s: restore sw for target %d\n",				sc->sc_dev.dv_xname, i);#endif		free(sc->targets[i]->lunsw, M_DEVBUF);		sc->targets[i]->lunsw = siop_get_lunsw(sc);		if (sc->targets[i]->lunsw == NULL) {			printf("%s: can't alloc lunsw for target %d\n",			    sc->sc_dev.dv_xname, i);			break;		}		siop_add_reselsw(sc, i);	}	/* start script */	siop_script_sync(sc, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);	bus_space_write_4(sc->sc_rt, sc->sc_rh, SIOP_DSP,	    sc->sc_scriptaddr + Ent_reselect);}