transfer_pio(&phase, &msg, &len, 0);
if (transfer_pio(&phase, &msg, &len, 0) || len) scsi_reset(sc);
reselect(sc)struct ncr_softc *sc;{	u_char	phase;	u_long	len;	u_char	msg;	u_char	target_mask;	int	abort = 0;	SC_REQ	*tmp, *prev;	PID("reselect1");	target_mask = GET_5380_REG(NCR5380_DATA) & ~SC_HOST_ID;	/*	 * At this point, we have detected that our SCSI-id is on the bus,	 * SEL is true and BSY was false for at least one bus settle	 * delay (400 ns.).	 * We must assert BSY ourselves, until the target drops the SEL signal.	 * The SCSI-spec specifies no maximum time for this, so we have to	 * choose something long enough to suit all targets.	 */	SET_5380_REG(NCR5380_ICOM, SC_A_BSY);	len = 250000;	while ((GET_5380_REG(NCR5380_IDSTAT) & SC_S_SEL) && (len > 0)) {		delay(1);		len--;	}	if (GET_5380_REG(NCR5380_IDSTAT) & SC_S_SEL) {		/* Damn SEL isn't dropping */		scsi_reset(sc);		return;	}	SET_5380_REG(NCR5380_ICOM, 0);		/*	 * Check if the reselection is still valid. Check twice because	 * of possible line glitches - cheaper than delay(1) and we need	 * only a few nanoseconds.	 */	if (!(GET_5380_REG(NCR5380_IDSTAT) & SC_S_BSY)) {	    if (!(GET_5380_REG(NCR5380_IDSTAT) & SC_S_BSY)) {		ncr_aprint(sc, "Stepped into the reselection timeout\n");		return;	    }	}	/*	 * Get the expected identify message.	 */	phase = PH_MSGIN;	len   = 1;	transfer_pio(&phase, &msg, &len, 0);	if (len || !MSG_ISIDENTIFY(msg)) {		ncr_aprint(sc, "Expecting IDENTIFY, got 0x%x\n", msg);		abort = 1;	}	else {	    /*	     * Find the command reconnecting	     */	    for (tmp = discon_q, prev = NULL; tmp; prev = tmp, tmp = tmp->next){		if (target_mask == (1 << tmp->targ_id)) {			if (prev)				prev->next = tmp->next;			else discon_q = tmp->next;			tmp->next = NULL;			break;		}	    }	    if (tmp == NULL) {		ncr_aprint(sc, "No disconnected job for targetmask %x\n",								target_mask);		abort = 1;	    }	}	if (abort) {		msg   = MSG_ABORT;		len   = 1;		phase = PH_MSGOUT;		SET_5380_REG(NCR5380_ICOM, SC_A_ATN);		transfer_pio(&phase, &msg, &len, 0);	}	else {		connected = tmp;#ifdef DBG_REQ		if (dbg_target_mask & (1 << tmp->targ_id))			show_request(tmp, "RECON");#endif	}	PID("reselect2");}