req_idx = cpu_to_le16(req_offset / ioc->req_sz); mf->u.frame.hwhdr.msgctxu.fld.req_idx = req_idx; 
req_idx = req_offset / ioc->req_sz; mf->u.frame.hwhdr.msgctxu.fld.req_idx = cpu_to_le16(req_idx); 
mpt_get_msg_frame(int handle, MPT_ADAPTER *ioc){	MPT_FRAME_HDR *mf;	unsigned long flags;	u16	 req_idx;	/* Request index */	/* validate handle and ioc identifier */#ifdef MFCNT	if (!ioc->active)		printk(KERN_WARNING "IOC Not Active! mpt_get_msg_frame returning NULL!\n");#endif	/* If interrupts are not attached, do not return a request frame */	if (!ioc->active)		return NULL;	spin_lock_irqsave(&ioc->FreeQlock, flags);	if (!list_empty(&ioc->FreeQ)) {		int req_offset;		mf = list_entry(ioc->FreeQ.next, MPT_FRAME_HDR,				u.frame.linkage.list);		list_del(&mf->u.frame.linkage.list);		mf->u.frame.hwhdr.msgctxu.fld.cb_idx = handle;	/* byte */		req_offset = (u8 *)mf - (u8 *)ioc->req_frames;								/* u16! */		req_idx = cpu_to_le16(req_offset / ioc->req_sz);		mf->u.frame.hwhdr.msgctxu.fld.req_idx = req_idx;		mf->u.frame.hwhdr.msgctxu.fld.rsvd = 0;		ioc->RequestNB[req_idx] = ioc->NB_for_64_byte_frame; /* Default, will be changed if necessary in SG generation */#ifdef MFCNT		ioc->mfcnt++;#endif	}	else		mf = NULL;	spin_unlock_irqrestore(&ioc->FreeQlock, flags);#ifdef MFCNT	if (mf == NULL)		printk(KERN_WARNING "IOC Active. No free Msg Frames! Count 0x%x Max 0x%x\n", ioc->mfcnt, ioc->req_depth);	mfcounter++;	if (mfcounter == PRINT_MF_COUNT)		printk(KERN_INFO "MF Count 0x%x Max 0x%x \n", ioc->mfcnt, ioc->req_depth);#endif	dmfprintk((KERN_INFO MYNAM ": %s: mpt_get_msg_frame(%d,%d), got mf=%p\n",			ioc->name, handle, ioc->id, mf));	return mf;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/d335cc38c75e28407455463444b912b09c92daec/mptbase.c/buggy/drivers/message/fusion/mptbase.c