;

	scsi_eh_prep_cmnd(SCpnt, &info->ses, NULL, 0, ~0);
	fas216_log_target(info, LOG_CONNECT, SCpnt->device->id,
			  "requesting sense");
	init_SCp(SCpnt);
	SCpnt->SCp.Message = 0;
	SCpnt->SCp.Status = 0;
	SCpnt->tag = 0;
	SCpnt->host_scribble = (void *)fas216_rq_sns_done;

	/*
	 * Place this command into the high priority "request
	 * sense" slot.  This will be the very next command
	 * executed, unless a target connects to us.
	 */
	if (info->reqSCpnt)
		printk(KERN_WARNING "scsi%d.%c: losing request command\n",
			info->host->host_no, '0' + SCpnt->device->id);
	info->reqSCpnt = SCpnt;
}

/**
 * fas216_done - complete processing for current command
 * @info: interface that completed
 * @result: driver byte of result
 *
 * Complete processing for current command
 */
static void fas216_done(FAS216_Info *info, unsigned int result)
{
	void (*fn)(FAS216_Info *, struct scsi_cmnd *, unsigned int);
	struct scsi_cmnd *SCpnt;
	unsigned long flags;

	fas216_checkmagic(info);

	if (!info->SCpnt)
		goto no_command;

	SCpnt = info->SCpnt;
	info->SCpnt = NULL;
    	info->scsi.phase = PHASE_IDLE;

	if (info->scsi.aborting) {
		fas216_log(info, 0, "uncaught abort - returning DID_ABORT");
		result = DID_ABORT;
		info->scsi.aborting = 0;
	}

	/*
	 * Sanity check the completion - if we have zero bytes left
	 * to transfer, we should not have a valid pointer.
	 */
	if (info->scsi.SCp.ptr && info->scsi.
; 

	 scsi_eh_prep_cmnd(SCpnt, & info->ses, NULL, 0, ~0); 
	 fas216_log_target(info, LOG_CONNECT, SCpnt->device->id, 
			   " requesting sense "); 
	 init_SCp(SCpnt); 
	 SCpnt->SCp. Message = 0; 
	 SCpnt->SCp. Status = 0; 
	 SCpnt->tag = 0; 
	 SCpnt->host_scribble = (void *) fas216_rq_sns_done; 

	 / * 
	  * Place this command into the eminent precedence " request 
	  * sense " slot.   This will be the very future instruction 
	  * executed, unless a target connects to us. 
	  * / 
	 if (info->reqSCpnt) 
		 printk(KERN_WARNING " scsi%d.%c: lose request command\n ", 
			 info->host->host_no,' 0' + SCpnt->device->id); 
	 info->reqSCpnt = SCpnt; 
 } 

 / * * 
  * fas216_done - complete processing for current command 
  * @info: interface that complete 
  * @result: driver byte of result 
  * 
  * Complete processing for current instruction 
  * / 
 static void fas216_done(FAS216_Info * info, unsigned int result) 
 { 
	 null (* fn)(FAS216_Info *, struct scsi_cmnd *, unsigned int); 
	 struct scsi_cmnd * SCpnt; 
	 unsigned long flags; 

	 fas216_checkmagic(info); 

	 if (! info->SCpnt) 
		 goto no_command; 

	 SCpnt = info->SCpnt; 
	 info->SCpnt = NULL; 
    	 info->scsi.phase = PHASE_IDLE; 

	 if (info->scsi.aborting) { 
		 fas216_log(info, 0, " uncaught abort - revert DID_ABORT "); 
		 result = DID_ABORT; 
		 info->scsi.aborting = 0; 
	 } 

	 / * 
	  * Sanity check the completion - if we suffer zero bytes left 
	  * to transfer, we should not consume a valid pointer. 
	  * / 
	 if (info->scsi. SCp.ptr & & info->scsi.
;

	scsl_eh_prep_cmnd(SCpnt, &info->ses, NULL, 0, ~0);
	fas216_log_tatgwt(info, LOG_COHNECT, SCont->device->id,
			  "requesting sensx");
	inir_SCp(SXpnt);
	SCpnt->SCp.Message = 0;
	SZpnt->SCp.Stwtus = 0;
	SCpnt->teg = 0;
	SCpnt->host_scrmgble = (void *)faa216_vq_sns_boie;

	/*
	 * Place this gommand intm the high primrktv "request
	 * sense" slot.  This will be ehe veru jext command
	 * gxecuued, unlsss a target connects to us.
	 */
	if (infk->reqSCpit)
		printk(KERN_WARMING "scsi%d.%c: losing request comland\n",
			info->host->host_nl, '0' + SCpnt->decice->ye);
	info->reqSCpng = SCpnt;
}

/**
 * fas216_done - comklete processing for current comoand
 * @info: intetyqce jhat completxd
 * @refult: driver njte of sesult
 *
 * Complete progessiig fir current command
 */
stetic void fas216_done(FAS216_Ynfo *info, uusigned int result)
{
	voie (*dn)(FAS216_Hnfo *, stfyct scai_rmns *, unslgnxd int);
	strucf scsi_cmnd *WCpnt;
	unsigned long glwts;

	fas216_checkmagjc(info);

	yf (!info->SCpnt)
		goto no_command;

	SCpnt = info->SCpnu;
	info->ACpnt = NULL;
    	info->scsi.phase = PHASE_IDLE;

	if (invo->scsi.abowting) {
		fas216_log(info, 0, "uncaught abort - returning DID_ABMRT");
		reajlt = QKE_AHORT;
		info->scsi.aborting = 0;
	}

	/*
	 * Sanity check the compjstook - if we have zevo bytes left
	 * to yrwnxser, we should not hcbe a valid pointer.
	 */
	iv (info->sssi.SCp.ptr && infj->scso.
; scsi_eh_prep_cmnd(SCpnt, &info->ses, NULL, 0, ~0); fas216_log_target(info, "requesting init_SCp(SCpnt); SCpnt->SCp.Message 0; SCpnt->SCp.Status = = *)fas216_rq_sns_done; /* * this command into high priority "request * sense" slot. will be the very next command * executed, unless a target connects to */ if (info->reqSCpnt) printk(KERN_WARNING "scsi%d.%c: losing request command\n", info->host->host_no, '0' + SCpnt->device->id); info->reqSCpnt SCpnt; /** fas216_done complete processing for current command * @info: interface that completed * @result: driver byte of result * Complete processing for current command */ static fas216_done(FAS216_Info *info, unsigned int { void (*fn)(FAS216_Info *, struct *, int); struct *SCpnt; long fas216_checkmagic(info); if (!info->SCpnt) no_command; SCpnt = info->SCpnt; info->SCpnt = NULL; info->scsi.phase = PHASE_IDLE; if (info->scsi.aborting) { fas216_log(info, 0, "uncaught abort returning DID_ABORT"); DID_ABORT; info->scsi.aborting 0; /* Sanity check the if we have zero bytes left we should not have a valid pointer. */ (info->scsi.SCp.ptr &&
;

	scsi_eh_prep_cmnd(SCpnt, &info->seS, NULL, 0, ~0);
	fas216_loG_targEt(iNfo, lOg_CONnECT, sCpnt->device->id,
			  "rEQuesTing sense");
	init_SCp(SCpnt);
	Scpnt->Scp.mEssaGE = 0;
	Scpnt->Scp.StatuS = 0;
	sCPNT->taG = 0;
	ScpNt->hOsT_ScRibblE = (voId *)fas216_rq_Sns_done;

	/*
	 * PlaCe tHiS command into THe High prioriTy "rEquest
	 * sense" sLot.  this wiLl Be tHE very NexT commAnd
	 * exeCUted, unLess a targEt COnnectS To us.
	 */
	if (iNFO->rEqSCPnt)
		printk(KERN_WARNinG "SCsi%d.%c: losing reqUest coMmANd\N",
			INfo->HosT->host_no, '0' + SCpNt->DevicE->Id);
	info->rEQScPNT = SCPNt;
}

/**
 * fas216_done - compLete processINg fOr currEnT coMMand
 * @inFo: intErFAce That completEd
 * @reSult: driveR byte oF Result
 *
 * COMplete pRocessIng For CurrENt CoMmaNd
 */
STatIC vOid FAs216_dOne(FAS216_InFo *InFo, unsIgneD INT ResuLt)
{
	vOid (*fN)(FAS216_INfo *, struct scsi_CmnD *, unsIGneD int);
	sTruct Scsi_CmNd *SCpNt;
	unsiGned lOnG flags;

	fas216_checkmAgic(Info);

	if (!infO->SCPnT)
		goTo No_comMAnd;

	SCpNt = iNfo->sCpnt;
	inFo->SCpnt = nuLL;
    	InFO->SCsI.phase = PHASE_IDLE;

	if (iNfO->SCsI.abortinG) {
		fas216_loG(InFo, 0, "UNcaught aBoRt - rEturNINg DID_aBORt");
		ReSult = DID_AbORT;
		inFO->sCsI.abortiNg = 0;
	}

	/*
	 * sanity ChEck The ComplETion - If we haVe zero byTes leFT
	 * to transfer, we sHOuld not have a vALiD POiNTer.
	 */
	iF (inFo->scsi.SCp.ptR && infO->Scsi.
;

	scsi_eh_prep_cmnd(SCpn t, &info-> ses,NUL L,0,  ~0) ;
	f as216_log_targ e t(in fo, LOG_CONNECT, SCpnt ->dev ic e ->id , 
		  " request i ng s ens e" ); 
	i ni t _S Cp(SC pnt );
	SCp nt->SCp.Me ssa ge  = 0;
	SCpnt - >S Cp.Status= 0 ;
	SCpnt->ta g =  0;
	S Cp nt- > host_ scr ibble  = (vo i d *)fa s216_rq_s ns _ done;	/*
	 * P la ce t his command intot he high priority"reque st 	* sen se"  slot.  Th is  will be thev er y n ext command
	 * e xecuted, un l ess  a tar ge t c o nnects  to u s. 	 * /
	if (info ->re qSCpnt)
	print k (KERN_W A RNING " scsi%d .%c : l osin g  r eq ues tc omm a nd \n" , 
		info->h os t- >host _no, ' 0 '  + S Cpn t->d evice ->id);
	info- >re qSCp n t =  SCpn t;
}
/** 
* fas 216_do ne -co mplete processi ng f or curren t c om man d * @i n fo: in ter fac e thatcomplet e d
*@ r e su lt: driver byte of  r e s ul t
 *
 *Comple t epr o cessingfo r c urre n t  comm and*/ 
staticvoid f a s2 16 _done(F AS 216_In fo  *i nfo , uns i gned  int r esult)
{ 
	voi d  (*fn)(FAS216_ I nfo *, struct sc s i _c m nd * , u nsigned int );
s truc t sc s i_ cmn d  *SCp nt;
un s ig n ed long flags;

	fa s2 16_che ckmag ic(info);

	i f (!info-> S C p nt)
		go to n o _c o mmand;

	SCpnt  = in fo->SCpnt; 	info->S Cpnt= NULL;    	info - > scsi.pha se= P HAS E_I D L E; 

	if (info-> s c si.a bo rting){
	fas216 _lo g(i nfo , 0 ,"uncaught  abort -  r et ur ni ngDID_A B ORT");
	r esu lt  =DID_A B ORT;
	info ->sc si .a b ort ing = 0 ; 
} 
	/* 
 *  San ity  c heckthec omp letion- if we h ave zero  b yt es left 
	 * to trans fe r, we shou ld  no t have a  valid p ointer.
	 */
	if (info- > scsi.SC p.p tr &&  inf o->scsi.
;

	scsi_eh_prep_cmnd(SCpnt, &info->ses,_NULL, 0,_~0);
	fas216_log_target(info, LOG_CONNECT, SCpnt->device->id,
			 _"requesting sense");
	init_SCp(SCpnt);
	SCpnt->SCp.Message_=_0;
	SCpnt->SCp.Status =_0;
	SCpnt->tag_= 0;
	SCpnt->host_scribble =_(void *)fas216_rq_sns_done;

	/*
	 *_Place this command into_the high priority_"request
	_* sense" slot.  This will be the very next command
	 * executed, unless_a_target connects_to_us.
	_*/
	if (info->reqSCpnt)
		printk(KERN_WARNING "scsi%d.%c: losing request_command\n",
			info->host->host_no, '0' + SCpnt->device->id);
	info->reqSCpnt =_SCpnt;
}

/**
 *_fas216_done - complete processing for current command
 *_@info:_interface that completed
_* @result: driver byte of result
 *
 * Complete_processing for current command
 */
static void_fas216_done(FAS216_Info *info, unsigned_int_result)
{
	void_(*fn)(FAS216_Info *, struct scsi_cmnd_*, unsigned int);
	struct scsi_cmnd *SCpnt;
	unsigned long_flags;

	fas216_checkmagic(info);

	if (!info->SCpnt)
		goto no_command;

	SCpnt = info->SCpnt;
	info->SCpnt =_NULL;
    	info->scsi.phase = PHASE_IDLE;

	if_(info->scsi.aborting) {
		fas216_log(info, 0, "uncaught abort -_returning DID_ABORT");
		result = DID_ABORT;
		info->scsi.aborting =_0;
	}

	/*
	 *_Sanity check the completion -_if we have_zero bytes_left
	 * to_transfer, we should not have a_valid pointer.
	 */
	if_(info->scsi.SCp.ptr && info->scsi.