u32 index; hw_fib->header.XferState |= cpu_to_le32(HostProcessed); if (size) { size += sizeof(struct aac_fibhdr); if (size > le16_to_cpu(hw_fib->header.SenderSize)) return -EMSGSIZE; hw_fib->header.Size = cpu_to_le16(size); 
if (dev->new_comm_interface) { kfree (hw_fib); } else { u32 index; hw_fib->header.XferState |= cpu_to_le32(HostProcessed); if (size) { size += sizeof(struct aac_fibhdr); if (size > le16_to_cpu(hw_fib->header.SenderSize)) return -EMSGSIZE; hw_fib->header.Size = cpu_to_le16(size); } q = &dev->queues->queue[AdapNormRespQueue]; spin_lock_irqsave(q->lock, qflags); aac_queue_get(dev, &index, AdapNormRespQueue, hw_fib, 1, NULL, &nointr); *(q->headers.producer) = cpu_to_le32(index + 1); spin_unlock_irqrestore(q->lock, qflags); if (!(nointr & (int)aac_config.irq_mod)) aac_adapter_notify(dev, AdapNormRespQueue); 
int fib_adapter_complete(struct fib * fibptr, unsigned short size){	struct hw_fib * hw_fib = fibptr->hw_fib;	struct aac_dev * dev = fibptr->dev;	struct aac_queue * q;	unsigned long nointr = 0;	unsigned long qflags;	if (hw_fib->header.XferState == 0) {        	return 0;	}	/*	 *	If we plan to do anything check the structure type first.	 */ 	if ( hw_fib->header.StructType != FIB_MAGIC ) {        	return -EINVAL;	}	/*	 *	This block handles the case where the adapter had sent us a	 *	command and we have finished processing the command. We	 *	call completeFib when we are done processing the command 	 *	and want to send a response back to the adapter. This will 	 *	send the completed cdb to the adapter.	 */	if (hw_fib->header.XferState & cpu_to_le32(SentFromAdapter)) {		u32 index;	        hw_fib->header.XferState |= cpu_to_le32(HostProcessed);		if (size) {			size += sizeof(struct aac_fibhdr);			if (size > le16_to_cpu(hw_fib->header.SenderSize)) 				return -EMSGSIZE;			hw_fib->header.Size = cpu_to_le16(size);		}		q = &dev->queues->queue[AdapNormRespQueue];		spin_lock_irqsave(q->lock, qflags);		aac_queue_get(dev, &index, AdapNormRespQueue, hw_fib, 1, NULL, &nointr);		*(q->headers.producer) = cpu_to_le32(index + 1);		spin_unlock_irqrestore(q->lock, qflags);		if (!(nointr & (int)aac_config.irq_mod))			aac_adapter_notify(dev, AdapNormRespQueue);	}	else 	{        	printk(KERN_WARNING "fib_adapter_complete: Unknown xferstate detected.\n");        	BUG();	}   	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/8e0c5ebde82b08f6d996e11983890fc4cc085fab/commsup.c/buggy/drivers/scsi/aacraid/commsup.c