 if ((r = SendPortEnable(ioc, 0, sleepFlag)) != 0) 
 if ((r = SendPortEnable(ioc, 0, sleepFlag)) != 0) { printk(MYIOC_s_ERR_FMT "Sending PortEnable failed(%d)!\n",ioc->name, r); 
SendIocInit(MPT_ADAPTER *ioc, int sleepFlag){	IOCInit_t		 ioc_init;	MPIDefaultReply_t	 init_reply;	u32			 state;	int			 r;	int			 count;	int			 cntdn;	memset(&ioc_init, 0, sizeof(ioc_init));	memset(&init_reply, 0, sizeof(init_reply));	ioc_init.WhoInit = MPI_WHOINIT_HOST_DRIVER;	ioc_init.Function = MPI_FUNCTION_IOC_INIT;	/* If we are in a recovery mode and we uploaded the FW image,	 * then this pointer is not NULL. Skip the upload a second time.	 * Set this flag if cached_fw set for either IOC.	 */	if (ioc->facts.Flags & MPI_IOCFACTS_FLAGS_FW_DOWNLOAD_BOOT)		ioc->upload_fw = 1;	else		ioc->upload_fw = 0;	ddlprintk((MYIOC_s_INFO_FMT "upload_fw %d facts.Flags=%x\n",		   ioc->name, ioc->upload_fw, ioc->facts.Flags));	if (ioc->bus_type == FC)		ioc_init.MaxDevices = MPT_MAX_FC_DEVICES;	else		ioc_init.MaxDevices = MPT_MAX_SCSI_DEVICES;		ioc_init.MaxBuses = MPT_MAX_BUS;	ioc_init.ReplyFrameSize = cpu_to_le16(ioc->reply_sz);	/* in BYTES */	if (sizeof(dma_addr_t) == sizeof(u64)) {		/* Save the upper 32-bits of the request		 * (reply) and sense buffers.		 */		ioc_init.HostMfaHighAddr = cpu_to_le32((u32)((u64)ioc->alloc_dma >> 32));		ioc_init.SenseBufferHighAddr = cpu_to_le32((u32)((u64)ioc->sense_buf_pool_dma >> 32));	} else {		/* Force 32-bit addressing */		ioc_init.HostMfaHighAddr = cpu_to_le32(0);		ioc_init.SenseBufferHighAddr = cpu_to_le32(0);	}			ioc->facts.CurrentHostMfaHighAddr = ioc_init.HostMfaHighAddr;	ioc->facts.CurrentSenseBufferHighAddr = ioc_init.SenseBufferHighAddr;	dhsprintk((MYIOC_s_INFO_FMT "Sending IOCInit (req @ %p)\n",			ioc->name, &ioc_init));	r = mpt_handshake_req_reply_wait(ioc, sizeof(IOCInit_t), (u32*)&ioc_init,				sizeof(MPIDefaultReply_t), (u16*)&init_reply, 10 /*seconds*/, sleepFlag);	if (r != 0)		return r;	/* No need to byte swap the multibyte fields in the reply	 * since we don't even look at it's contents.	 */	dhsprintk((MYIOC_s_INFO_FMT "Sending PortEnable (req @ %p)\n",			ioc->name, &ioc_init));		if ((r = SendPortEnable(ioc, 0, sleepFlag)) != 0)		return r;	/* YIKES!  SUPER IMPORTANT!!!	 *  Poll IocState until _OPERATIONAL while IOC is doing	 *  LoopInit and TargetDiscovery!	 */	count = 0;	cntdn = ((sleepFlag == CAN_SLEEP) ? HZ : 1000) * 60;	/* 60 seconds */	state = mpt_GetIocState(ioc, 1);	while (state != MPI_IOC_STATE_OPERATIONAL && --cntdn) {		if (sleepFlag == CAN_SLEEP) {			msleep_interruptible(1);		} else {			mdelay(1);		}		if (!cntdn) {			printk(MYIOC_s_ERR_FMT "Wait IOC_OP state timeout(%d)!\n",					ioc->name, (int)((count+5)/HZ));			return -9;		}		state = mpt_GetIocState(ioc, 1);		count++;	}	dhsprintk((MYIOC_s_INFO_FMT "INFO - Wait IOC_OPERATIONAL state (cnt=%d)\n",			ioc->name, count));	return r;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/c6678e0cfb41b029c3600c54b5bb65954de1230a/mptbase.c/clean/drivers/message/fusion/mptbase.c