mpt_send_handshake_request(int handle, MPT_ADAPTER *ioc, int reqBytes, u32 *req, int sleepFlag){	int		 r = 0;	u8	*req_as_bytes;	int	 ii;	/* State is known to be good upon entering	 * this function so issue the bus reset	 * request.	 */	/*	 * Emulate what mpt_put_msg_frame() does /wrt to sanity	 * setting cb_idx/req_idx.  But ONLY if this request	 * is in proper (pre-alloc'd) request buffer range...	 */	ii = MFPTR_2_MPT_INDEX(ioc,(MPT_FRAME_HDR*)req);	if (reqBytes >= 12 && ii >= 0 && ii < ioc->req_depth) {		MPT_FRAME_HDR *mf = (MPT_FRAME_HDR*)req;		mf->u.frame.hwhdr.msgctxu.fld.req_idx = cpu_to_le16(ii);		mf->u.frame.hwhdr.msgctxu.fld.cb_idx = handle;	}	/* Make sure there are no doorbells */	CHIPREG_WRITE32(&ioc->chip->IntStatus, 0);		CHIPREG_WRITE32(&ioc->chip->Doorbell,			((MPI_FUNCTION_HANDSHAKE<<MPI_DOORBELL_FUNCTION_SHIFT) |			 ((reqBytes/4)<<MPI_DOORBELL_ADD_DWORDS_SHIFT)));	/* Wait for IOC doorbell int */	if ((ii = WaitForDoorbellInt(ioc, 5, sleepFlag)) < 0) {		return ii;	}	/* Read doorbell and check for active bit */	if (!(CHIPREG_READ32(&ioc->chip->Doorbell) & MPI_DOORBELL_ACTIVE))		return -5;	dhsprintk((KERN_INFO MYNAM ": %s: mpt_send_handshake_request start, WaitCnt=%d\n",			ioc->name, ii));	CHIPREG_WRITE32(&ioc->chip->IntStatus, 0);	if ((r = WaitForDoorbellAck(ioc, 5, sleepFlag)) < 0) {		return -2;	}			/* Send request via doorbell handshake */	req_as_bytes = (u8 *) req;	for (ii = 0; ii < reqBytes/4; ii++) {		u32 word;		word = ((req_as_bytes[(ii*4) + 0] <<  0) |			(req_as_bytes[(ii*4) + 1] <<  8) |			(req_as_bytes[(ii*4) + 2] << 16) |			(req_as_bytes[(ii*4) + 3] << 24));		CHIPREG_WRITE32(&ioc->chip->Doorbell, word);		if ((r = WaitForDoorbellAck(ioc, 5, sleepFlag)) < 0) {			r = -3;			break;		}	}	if (r >= 0 && WaitForDoorbellInt(ioc, 10, sleepFlag) >= 0)		r = 0;	else		r = -4;	/* Make sure there are no doorbells */	CHIPREG_WRITE32(&ioc->chip->IntStatus, 0);		return r;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/c6678e0cfb41b029c3600c54b5bb65954de1230a/mptbase.c/clean/drivers/message/fusion/mptbase.c