bus_space_write_4(sc->iot, sc->ioh, TWE_CONTROL, TWE_CTRL_ECMDI);
wakeup(sc);
twe_start(ccb, wait)	struct twe_ccb *ccb;	int wait;{	struct twe_softc*sc = ccb->ccb_sc;	struct twe_cmd	*cmd = ccb->ccb_cmd;	u_int32_t	status;	int i;	cmd->cmd_op = htole16(cmd->cmd_op);	if (!wait) {		TWE_DPRINTF(TWE_D_CMD, ("prequeue(%d) ", cmd->cmd_index));		ccb->ccb_state = TWE_CCB_PREQUEUED;		TAILQ_INSERT_TAIL(&sc->sc_ccb2q, ccb, ccb_link);		bus_space_write_4(sc->iot, sc->ioh, TWE_CONTROL,		    TWE_CTRL_ECMDI);		return 0;	}	for (i = 1000; i--; DELAY(10)) {		status = bus_space_read_4(sc->iot, sc->ioh, TWE_STATUS);		if (!(status & TWE_STAT_CQF))			break;		TWE_DPRINTF(TWE_D_CMD,  ("twe_start stat=%b ",		    status & TWE_STAT_FLAGS, TWE_STAT_BITS));	}	if (!(status & TWE_STAT_CQF)) {		bus_space_write_4(sc->iot, sc->ioh, TWE_COMMANDQUEUE,		    ccb->ccb_cmdpa);		TWE_DPRINTF(TWE_D_CMD, ("queue(%d) ", cmd->cmd_index));		ccb->ccb_state = TWE_CCB_QUEUED;		TAILQ_INSERT_TAIL(&sc->sc_ccbq, ccb, ccb_link);		return 0;	} else {		printf("%s: twe_start(%d) timed out\n",		    sc->sc_dev.dv_xname, cmd->cmd_index);		return 1;	}}