struct siop_cmd *siop_cmd;
struct siop_common_cmd *siop_cmd;
siop_ppr_neg(siop_cmd)	struct siop_cmd *siop_cmd;{	struct siop_softc *sc = siop_cmd->siop_sc;	struct siop_target *siop_target = siop_cmd->siop_target;	int target = siop_cmd->xs->sc_link->target;	struct siop_xfer_common *tables = &siop_cmd->siop_xfer->tables;	int offset, sync, protocol, scf;	sync     = tables->msg_in[3];	offset   = tables->msg_in[5];	protocol = tables->msg_in[7];#ifdef DEBUG	printf("%s: siop_ppr_neg: sync = %x, offset = %x, protocol = %x\n",	    sc->sc_dev.dv_xname, sync, offset, protocol);#endif	/*	 * Process protocol bits first, because finding the correct scf	 * via siop_period_factor_to_scf() requires the TARF_ISDT flag	 * to be correctly set.	 */	if (protocol & MSG_EXT_PPR_PROT_IUS)		siop_target->flags |= TARF_ISIUS;	if (protocol & MSG_EXT_PPR_PROT_DT) {		siop_target->flags |= TARF_ISDT;		sc->targets[target]->id |= SCNTL4_ULTRA3;	}	if (protocol & MSG_EXT_PPR_PROT_QAS)		siop_target->flags |= TARF_ISQAS;	scf = siop_period_factor_to_scf(sc, sync, siop_target->flags);	if ((offset > sc->maxoff) ||	    (scf == 0) ||	    ((siop_target->flags & TARF_ISDT) && (offset == 1))) {		tables->t_msgout.count= htole32(1);		tables->msg_out[0] = MSG_MESSAGE_REJECT;		return (SIOP_NEG_MSGOUT);	}	siop_target->id |= scf << (24 + SCNTL3_SCF_SHIFT);	if (((sc->features & SF_CHIP_C10) == 0) && (sync < 25))		siop_target->id |= SCNTL3_ULTRA << 24;	siop_target->id |= (offset & 0xff) << 8;		if (tables->msg_in[6] == MSG_EXT_WDTR_BUS_16_BIT) {		siop_target->flags |= TARF_ISWIDE;		sc->targets[target]->id |= (SCNTL3_EWS << 24);	}#ifdef DEBUG	printf("%s: siop_ppr_neg: id now 0x%x, flags is now 0x%x\n",	    sc->sc_dev.dv_xname, siop_target->id, siop_target->flags);#endif	tables->id = htole32(siop_target->id);	bus_space_write_1(sc->sc_rt, sc->sc_rh, SIOP_SCNTL3,	    (siop_target->id >> 24) & 0xff);	bus_space_write_1(sc->sc_rt, sc->sc_rh, SIOP_SXFER,	    (siop_target->id >> 8) & 0xff);	/* Only cards with SCNTL4 can cause PPR negotiations, so ... */	bus_space_write_1(sc->sc_rt, sc->sc_rh, SIOP_SCNTL4,	    (siop_target->id & 0xff));	siop_target->status = TARST_OK;	siop_print_info(sc, target);		return (SIOP_NEG_ACK);}