c->Header.Tag.lower = c->busaddr; 
/* got command from pool, so use the command block index instead */ /* for direct lookups. */ /* The first 2 bits are reserved for controller error reporting. */ c->Header.Tag.lower = (c->cmdindex << 3); c->Header.Tag.lower |= 0x04; /* flag for direct lookup. */ 
static void do_cciss_request(request_queue_t *q){	ctlr_info_t *h= q->queuedata; 	CommandList_struct *c;	int start_blk, seg;	struct request *creq;	u64bit temp64;	struct scatterlist tmp_sg[MAXSGENTRIES];	drive_info_struct *drv;	int i, dir;	/* We call start_io here in case there is a command waiting on the	 * queue that has not been sent.	*/	if (blk_queue_plugged(q))		goto startio;queue:	creq = elv_next_request(q);	if (!creq)		goto startio;	if (creq->nr_phys_segments > MAXSGENTRIES)                BUG();	if (( c = cmd_alloc(h, 1)) == NULL)		goto full;	blkdev_dequeue_request(creq);	spin_unlock_irq(q->queue_lock);	c->cmd_type = CMD_RWREQ;	c->rq = creq;		/* fill in the request */ 	drv = creq->rq_disk->private_data;	c->Header.ReplyQueue = 0;  // unused in simple mode	c->Header.Tag.lower = c->busaddr;  // use the physical address the cmd block for tag	c->Header.LUN.LogDev.VolId= drv->LunID;	c->Header.LUN.LogDev.Mode = 1;	c->Request.CDBLen = 10; // 12 byte commands not in FW yet;	c->Request.Type.Type =  TYPE_CMD; // It is a command. 	c->Request.Type.Attribute = ATTR_SIMPLE; 	c->Request.Type.Direction = 		(rq_data_dir(creq) == READ) ? XFER_READ: XFER_WRITE; 	c->Request.Timeout = 0; // Don't time out		c->Request.CDB[0] = (rq_data_dir(creq) == READ) ? CCISS_READ : CCISS_WRITE;	start_blk = creq->sector;#ifdef CCISS_DEBUG	printk(KERN_DEBUG "ciss: sector =%d nr_sectors=%d\n",(int) creq->sector,		(int) creq->nr_sectors);	#endif /* CCISS_DEBUG */	seg = blk_rq_map_sg(q, creq, tmp_sg);	/* get the DMA records for the setup */ 	if (c->Request.Type.Direction == XFER_READ)		dir = PCI_DMA_FROMDEVICE;	else		dir = PCI_DMA_TODEVICE;	for (i=0; i<seg; i++)	{		c->SG[i].Len = tmp_sg[i].length;		temp64.val = (__u64) pci_map_page(h->pdev, tmp_sg[i].page,			 		  tmp_sg[i].offset, tmp_sg[i].length,					  dir);		c->SG[i].Addr.lower = temp64.val32.lower;                c->SG[i].Addr.upper = temp64.val32.upper;                c->SG[i].Ext = 0;  // we are not chaining	}	/* track how many SG entries we are using */ 	if( seg > h->maxSG)		h->maxSG = seg; #ifdef CCISS_DEBUG	printk(KERN_DEBUG "cciss: Submitting %d sectors in %d segments\n", creq->nr_sectors, seg);#endif /* CCISS_DEBUG */	c->Header.SGList = c->Header.SGTotal = seg;	c->Request.CDB[1]= 0;	c->Request.CDB[2]= (start_blk >> 24) & 0xff;	//MSB	c->Request.CDB[3]= (start_blk >> 16) & 0xff;	c->Request.CDB[4]= (start_blk >>  8) & 0xff;	c->Request.CDB[5]= start_blk & 0xff;	c->Request.CDB[6]= 0; // (sect >> 24) & 0xff; MSB	c->Request.CDB[7]= (creq->nr_sectors >>  8) & 0xff; 	c->Request.CDB[8]= creq->nr_sectors & 0xff; 	c->Request.CDB[9] = c->Request.CDB[11] = c->Request.CDB[12] = 0;	spin_lock_irq(q->queue_lock);	addQ(&(h->reqQ),c);	h->Qdepth++;	if(h->Qdepth > h->maxQsinceinit)		h->maxQsinceinit = h->Qdepth; 	goto queue;full:	blk_stop_queue(q);startio:	/* We will already have the driver lock here so not need	 * to lock it.	*/	start_io(h);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/33079b21978f478865068ee6a3c5807b6c6ecdbe/cciss.c/clean/drivers/block/cciss.c