cp->phys.smsg.addr	= cpu_to_scr(CCB_BA(cp, scsi_smsg2)); 
cp->phys.smsg.addr	= CCB_BA(cp, scsi_smsg2); 
static void sym_sir_bad_scsi_status(struct sym_hcb *np, int num, struct sym_ccb *cp){	u32		startp;	u_char		s_status = cp->ssss_status;	u_char		h_flags  = cp->host_flags;	int		msglen;	int		i;	/*	 *  Compute the index of the next job to start from SCRIPTS.	 */	i = (INL(np, nc_scratcha) - np->squeue_ba) / 4;	/*	 *  The last CCB queued used for IARB hint may be 	 *  no longer relevant. Forget it.	 */#ifdef SYM_CONF_IARB_SUPPORT	if (np->last_cp)		np->last_cp = 0;#endif	/*	 *  Now deal with the SCSI status.	 */	switch(s_status) {	case S_BUSY:	case S_QUEUE_FULL:		if (sym_verbose >= 2) {			sym_print_addr(cp->cmd, "%s\n",			        s_status == S_BUSY ? "BUSY" : "QUEUE FULL\n");		}	default:	/* S_INT, S_INT_COND_MET, S_CONFLICT */		sym_complete_error (np, cp);		break;	case S_TERMINATED:	case S_CHECK_COND:		/*		 *  If we get an SCSI error when requesting sense, give up.		 */		if (h_flags & HF_SENSE) {			sym_complete_error (np, cp);			break;		}		/*		 *  Dequeue all queued CCBs for that device not yet started,		 *  and restart the SCRIPTS processor immediately.		 */		sym_dequeue_from_squeue(np, i, cp->target, cp->lun, -1);		OUTL_DSP(np, SCRIPTA_BA(np, start)); 		/*		 *  Save some info of the actual IO.		 *  Compute the data residual.		 */		cp->sv_scsi_status = cp->ssss_status;		cp->sv_xerr_status = cp->xerr_status;		cp->sv_resid = sym_compute_residual(np, cp);		/*		 *  Prepare all needed data structures for 		 *  requesting sense data.		 */		cp->scsi_smsg2[0] = IDENTIFY(0, cp->lun);		msglen = 1;		/*		 *  If we are currently using anything different from 		 *  async. 8 bit data transfers with that target,		 *  start a negotiation, since the device may want 		 *  to report us a UNIT ATTENTION condition due to 		 *  a cause we currently ignore, and we donnot want 		 *  to be stuck with WIDE and/or SYNC data transfer.		 *		 *  cp->nego_status is filled by sym_prepare_nego().		 */		cp->nego_status = 0;		msglen += sym_prepare_nego(np, cp, &cp->scsi_smsg2[msglen]);		/*		 *  Message table indirect structure.		 */		cp->phys.smsg.addr	= cpu_to_scr(CCB_BA(cp, scsi_smsg2));		cp->phys.smsg.size	= cpu_to_scr(msglen);		/*		 *  sense command		 */		cp->phys.cmd.addr	= cpu_to_scr(CCB_BA(cp, sensecmd));		cp->phys.cmd.size	= cpu_to_scr(6);		/*		 *  patch requested size into sense command		 */		cp->sensecmd[0]		= REQUEST_SENSE;		cp->sensecmd[1]		= 0;		if (cp->cmd->device->scsi_level <= SCSI_2 && cp->lun <= 7)			cp->sensecmd[1]	= cp->lun << 5;		cp->sensecmd[4]		= SYM_SNS_BBUF_LEN;		cp->data_len		= SYM_SNS_BBUF_LEN;		/*		 *  sense data		 */		memset(cp->sns_bbuf, 0, SYM_SNS_BBUF_LEN);		cp->phys.sense.addr	= cpu_to_scr(CCB_BA(cp, sns_bbuf));		cp->phys.sense.size	= cpu_to_scr(SYM_SNS_BBUF_LEN);		/*		 *  requeue the command.		 */		startp = SCRIPTB_BA(np, sdata_in);		cp->phys.head.savep	= cpu_to_scr(startp);		cp->phys.head.lastp	= cpu_to_scr(startp);		cp->startp		= cpu_to_scr(startp);		cp->goalp		= cpu_to_scr(startp + 16);		cp->host_xflags = 0;		cp->host_status	= cp->nego_status ? HS_NEGOTIATE : HS_BUSY;		cp->ssss_status = S_ILLEGAL;		cp->host_flags	= (HF_SENSE|HF_DATA_IN);		cp->xerr_status = 0;		cp->extra_bytes = 0;		cp->phys.head.go.start = cpu_to_scr(SCRIPTA_BA(np, select));		/*		 *  Requeue the command.		 */		sym_put_start_queue(np, cp);		/*		 *  Give back to upper layer everything we have dequeued.		 */		sym_flush_comp_queue(np, 0);		break;	}}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/53222b906903fd861dc24ebccfa07ee125941313/sym_hipd.c/clean/drivers/scsi/sym53c8xx_2/sym_hipd.c