dinitprintk((KERN_INFO MYNAM ": %s.RequestBuffers @ %p[%p]\n", 
dinitprintk((KERN_INFO MYNAM ": %s RequestBuffers @ %p[%p]\n", 
PrimeIocFifos(MPT_ADAPTER *ioc){	MPT_FRAME_HDR *mf;	unsigned long flags;	dma_addr_t alloc_dma;	u8 *mem;	int i, reply_sz, sz, total_size, num_chain;	/*  Prime reply FIFO...  */	if (ioc->reply_frames == NULL) {		if ( (num_chain = initChainBuffers(ioc)) < 0)			return -1;		total_size = reply_sz = (ioc->reply_sz * ioc->reply_depth);		dinitprintk((KERN_INFO MYNAM ": %s.ReplyBuffer sz=%d bytes, ReplyDepth=%d\n",			 	ioc->name, ioc->reply_sz, ioc->reply_depth));		dinitprintk((KERN_INFO MYNAM ": %s.ReplyBuffer sz=%d[%x] bytes\n",			 	ioc->name, reply_sz, reply_sz));		sz = (ioc->req_sz * ioc->req_depth);		dinitprintk((KERN_INFO MYNAM ": %s.RequestBuffer sz=%d bytes, RequestDepth=%d\n",			 	ioc->name, ioc->req_sz, ioc->req_depth));		dinitprintk((KERN_INFO MYNAM ": %s.RequestBuffer sz=%d[%x] bytes\n",			 	ioc->name, sz, sz));		total_size += sz;		sz = num_chain * ioc->req_sz; /* chain buffer pool size */		dinitprintk((KERN_INFO MYNAM ": %s.ChainBuffer sz=%d bytes, ChainDepth=%d\n",			 	ioc->name, ioc->req_sz, num_chain));		dinitprintk((KERN_INFO MYNAM ": %s.ChainBuffer sz=%d[%x] bytes num_chain=%d\n",			 	ioc->name, sz, sz, num_chain));		total_size += sz;		mem = pci_alloc_consistent(ioc->pcidev, total_size, &alloc_dma);		if (mem == NULL) {			printk(MYIOC_s_ERR_FMT "Unable to allocate Reply, Request, Chain Buffers!\n",				ioc->name);			goto out_fail;		}		dinitprintk((KERN_INFO MYNAM ": %s.Total alloc @ %p[%p], sz=%d[%x] bytes\n",			 	ioc->name, mem, (void *)(ulong)alloc_dma, total_size, total_size));		memset(mem, 0, total_size);		ioc->alloc_total += total_size;		ioc->alloc = mem;		ioc->alloc_dma = alloc_dma;		ioc->alloc_sz = total_size;		ioc->reply_frames = (MPT_FRAME_HDR *) mem;		ioc->reply_frames_low_dma = (u32) (alloc_dma & 0xFFFFFFFF);		alloc_dma += reply_sz;		mem += reply_sz;		/*  Request FIFO - WE manage this!  */		ioc->req_frames = (MPT_FRAME_HDR *) mem;		ioc->req_frames_dma = alloc_dma;		dinitprintk((KERN_INFO MYNAM ": %s.RequestBuffers @ %p[%p]\n",			 	ioc->name, mem, (void *)(ulong)alloc_dma));		ioc->req_frames_low_dma = (u32) (alloc_dma & 0xFFFFFFFF);#if defined(CONFIG_MTRR) && 0		/*		 *  Enable Write Combining MTRR for IOC's memory region.		 *  (at least as much as we can; "size and base must be		 *  multiples of 4 kiB"		 */		ioc->mtrr_reg = mtrr_add(ioc->req_frames_dma,					 sz,					 MTRR_TYPE_WRCOMB, 1);		dprintk((MYIOC_s_INFO_FMT "MTRR region registered (base:size=%08x:%x)\n",				ioc->name, ioc->req_frames_dma, sz));#endif		for (i = 0; i < ioc->req_depth; i++) {			alloc_dma += ioc->req_sz;			mem += ioc->req_sz;		}		ioc->ChainBuffer = mem;		ioc->ChainBufferDMA = alloc_dma;		dinitprintk((KERN_INFO MYNAM " :%s.ChainBuffers @ %p(%p)\n",			ioc->name, ioc->ChainBuffer, (void *)(ulong)ioc->ChainBufferDMA));		/* Initialize the free chain Q.	 	*/		INIT_LIST_HEAD(&ioc->FreeChainQ);		/* Post the chain buffers to the FreeChainQ.	 	*/		mem = (u8 *)ioc->ChainBuffer;		for (i=0; i < num_chain; i++) {			mf = (MPT_FRAME_HDR *) mem;			list_add_tail(&mf->u.frame.linkage.list, &ioc->FreeChainQ);			mem += ioc->req_sz;		}		/* Initialize Request frames linked list		 */		alloc_dma = ioc->req_frames_dma;		mem = (u8 *) ioc->req_frames;		spin_lock_irqsave(&ioc->FreeQlock, flags);		INIT_LIST_HEAD(&ioc->FreeQ);		for (i = 0; i < ioc->req_depth; i++) {			mf = (MPT_FRAME_HDR *) mem;			/*  Queue REQUESTs *internally*!  */			list_add_tail(&mf->u.frame.linkage.list, &ioc->FreeQ);			mem += ioc->req_sz;		}		spin_unlock_irqrestore(&ioc->FreeQlock, flags);		sz = (ioc->req_depth * MPT_SENSE_BUFFER_ALLOC);		ioc->sense_buf_pool =			pci_alloc_consistent(ioc->pcidev, sz, &ioc->sense_buf_pool_dma);		if (ioc->sense_buf_pool == NULL) {			printk(MYIOC_s_ERR_FMT "Unable to allocate Sense Buffers!\n",				ioc->name);			goto out_fail;		}		ioc->sense_buf_low_dma = (u32) (ioc->sense_buf_pool_dma & 0xFFFFFFFF);		ioc->alloc_total += sz;		dinitprintk((KERN_INFO MYNAM ": %s.SenseBuffers @ %p[%p]\n", 			ioc->name, ioc->sense_buf_pool, (void *)(ulong)ioc->sense_buf_pool_dma));	}	/* Post Reply frames to FIFO	 */	alloc_dma = ioc->alloc_dma;	dinitprintk((KERN_INFO MYNAM ": %s.ReplyBuffers @ %p[%p]\n",	 	ioc->name, ioc->reply_frames, (void *)(ulong)alloc_dma));	for (i = 0; i < ioc->reply_depth; i++) {		/*  Write each address to the IOC!  */		CHIPREG_WRITE32(&ioc->chip->ReplyFifo, alloc_dma);		alloc_dma += ioc->reply_sz;	}	return 0;out_fail:	if (ioc->alloc != NULL) {		sz = ioc->alloc_sz;		pci_free_consistent(ioc->pcidev,				sz,				ioc->alloc, ioc->alloc_dma);		ioc->reply_frames = NULL;		ioc->req_frames = NULL;		ioc->alloc_total -= sz;	}	if (ioc->sense_buf_pool != NULL) {		sz = (ioc->req_depth * MPT_SENSE_BUFFER_ALLOC);		pci_free_consistent(ioc->pcidev,				sz,				ioc->sense_buf_pool, ioc->sense_buf_pool_dma);		ioc->sense_buf_pool = NULL;	}	return -1;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/c6678e0cfb41b029c3600c54b5bb65954de1230a/mptbase.c/clean/drivers/message/fusion/mptbase.c