int aac_comm_init(struct aac_dev * dev) 
static int aac_comm_init(struct aac_dev * dev) 
int aac_comm_init(struct aac_dev * dev){	unsigned long hdrsize = (sizeof(u32) * NUMBER_OF_COMM_QUEUES) * 2;	unsigned long queuesize = sizeof(struct aac_entry) * TOTAL_QUEUE_ENTRIES;	u32 *headers;	struct aac_entry * queues;	unsigned long size;	struct aac_queue_block * comm = dev->queues;	/*	 *	Now allocate and initialize the zone structures used as our 	 *	pool of FIB context records.  The size of the zone is based	 *	on the system memory size.  We also initialize the mutex used	 *	to protect the zone.	 */	spin_lock_init(&dev->fib_lock);	/*	 *	Allocate the physically contigous space for the commuication	 *	queue headers. 	 */	size = hdrsize + queuesize;	if (!aac_alloc_comm(dev, (void * *)&headers, size, QUEUE_ALIGNMENT))		return -ENOMEM;	queues = (struct aac_entry *)(((ulong)headers) + hdrsize);	/* Adapter to Host normal priority Command queue */ 	comm->queue[HostNormCmdQueue].base = queues;	aac_queue_init(dev, &comm->queue[HostNormCmdQueue], headers, HOST_NORM_CMD_ENTRIES);	queues += HOST_NORM_CMD_ENTRIES;	headers += 2;	/* Adapter to Host high priority command queue */	comm->queue[HostHighCmdQueue].base = queues;	aac_queue_init(dev, &comm->queue[HostHighCmdQueue], headers, HOST_HIGH_CMD_ENTRIES);    	queues += HOST_HIGH_CMD_ENTRIES;	headers +=2;	/* Host to adapter normal priority command queue */	comm->queue[AdapNormCmdQueue].base = queues;	aac_queue_init(dev, &comm->queue[AdapNormCmdQueue], headers, ADAP_NORM_CMD_ENTRIES);    	queues += ADAP_NORM_CMD_ENTRIES;	headers += 2;	/* host to adapter high priority command queue */	comm->queue[AdapHighCmdQueue].base = queues;	aac_queue_init(dev, &comm->queue[AdapHighCmdQueue], headers, ADAP_HIGH_CMD_ENTRIES);    	queues += ADAP_HIGH_CMD_ENTRIES;	headers += 2;	/* adapter to host normal priority response queue */	comm->queue[HostNormRespQueue].base = queues;	aac_queue_init(dev, &comm->queue[HostNormRespQueue], headers, HOST_NORM_RESP_ENTRIES);	queues += HOST_NORM_RESP_ENTRIES;	headers += 2;	/* adapter to host high priority response queue */	comm->queue[HostHighRespQueue].base = queues;	aac_queue_init(dev, &comm->queue[HostHighRespQueue], headers, HOST_HIGH_RESP_ENTRIES);   	queues += HOST_HIGH_RESP_ENTRIES;	headers += 2;	/* host to adapter normal priority response queue */	comm->queue[AdapNormRespQueue].base = queues;	aac_queue_init(dev, &comm->queue[AdapNormRespQueue], headers, ADAP_NORM_RESP_ENTRIES);	queues += ADAP_NORM_RESP_ENTRIES;	headers += 2;		/* host to adapter high priority response queue */ 	comm->queue[AdapHighRespQueue].base = queues;	aac_queue_init(dev, &comm->queue[AdapHighRespQueue], headers, ADAP_HIGH_RESP_ENTRIES);	comm->queue[AdapNormCmdQueue].lock = comm->queue[HostNormRespQueue].lock;	comm->queue[AdapHighCmdQueue].lock = comm->queue[HostHighRespQueue].lock;	comm->queue[AdapNormRespQueue].lock = comm->queue[HostNormCmdQueue].lock;	comm->queue[AdapHighRespQueue].lock = comm->queue[HostHighCmdQueue].lock;	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/4833869e6e6c2315e301c256e393dfb949c10076/comminit.c/clean/drivers/scsi/aacraid/comminit.c