if (role == ROLE_TARGET) transinfo = &tinfo->user; else transinfo = &tinfo->goal; *ppr_options &= transinfo->ppr_options; if (transinfo->period == 0) { *period = 0; *ppr_options = 0; return (NULL); } *period = MAX(*period, transinfo->period); return (ahc_find_syncrate(ahc, period, ppr_options, maxsync)); }
return (ahc_find_syncrate(ahc, period, maxsync)); }
ahc_devlimited_syncrate(struct ahc_softc *ahc,			struct ahc_initiator_tinfo *tinfo,			u_int *period, u_int *ppr_options, role_t role) {	struct	ahc_transinfo *transinfo;	u_int	maxsync;	if ((ahc->features & AHC_ULTRA2) != 0) {		if ((ahc_inb(ahc, SBLKCTL) & ENAB40) != 0		 && (ahc_inb(ahc, SSTAT2) & EXP_ACTIVE) == 0) {			maxsync = AHC_SYNCRATE_DT;		} else {			maxsync = AHC_SYNCRATE_ULTRA;			/* Can't do DT on an SE bus */			*ppr_options &= ~MSG_EXT_PPR_DT_REQ;		}	} else if ((ahc->features & AHC_ULTRA) != 0) {		maxsync = AHC_SYNCRATE_ULTRA;	} else {		maxsync = AHC_SYNCRATE_FAST;	}	/*	 * Never allow a value higher than our current goal	 * period otherwise we may allow a target initiated	 * negotiation to go above the limit as set by the	 * user.  In the case of an initiator initiated	 * sync negotiation, we limit based on the user	 * setting.  This allows the system to still accept	 * incoming negotiations even if target initiated	 * negotiation is not performed.	 */	if (role == ROLE_TARGET)		transinfo = &tinfo->user;	else 		transinfo = &tinfo->goal;	*ppr_options &= transinfo->ppr_options;	if (transinfo->period == 0) {		*period = 0;		*ppr_options = 0;		return (NULL);	}	*period = MAX(*period, transinfo->period);	return (ahc_find_syncrate(ahc, period, ppr_options, maxsync));}