printk("%s: qcomm, target %d.%d:%d, pid %ld, adapter busy.\n", ha->board_name, SCpnt->device->channel, SCpnt->device->id, SCpnt->device->lun, SCpnt->pid); 
scmd_printk(KERN_INFO, SCpnt, "qcomm, pid %ld, adapter busy.\n", SCpnt->pid); 
static int eata2x_queuecommand(struct scsi_cmnd *SCpnt,			       void (*done) (struct scsi_cmnd *)){	struct Scsi_Host *shost = SCpnt->device->host;	struct hostdata *ha = (struct hostdata *)shost->hostdata;	unsigned int i, k;	struct mscp *cpp;	if (SCpnt->host_scribble)		panic("%s: qcomm, pid %ld, SCpnt %p already active.\n",		      ha->board_name, SCpnt->pid, SCpnt);	/* i is the mailbox number, look for the first free mailbox	   starting from last_cp_used */	i = ha->last_cp_used + 1;	for (k = 0; k < shost->can_queue; k++, i++) {		if (i >= shost->can_queue)			i = 0;		if (ha->cp_stat[i] == FREE) {			ha->last_cp_used = i;			break;		}	}	if (k == shost->can_queue) {		printk("%s: qcomm, no free mailbox.\n", ha->board_name);		return 1;	}	/* Set pointer to control packet structure */	cpp = &ha->cp[i];	memset(cpp, 0, sizeof(struct mscp) - CP_TAIL_SIZE);	/* Set pointer to status packet structure, Big Endian format */	cpp->sp_dma_addr = H2DEV(ha->sp_dma_addr);	SCpnt->scsi_done = done;	cpp->cpp_index = i;	SCpnt->host_scribble = (unsigned char *)&cpp->cpp_index;	if (do_trace)		printk("%s: qcomm, mbox %d, target %d.%d:%d, pid %ld.\n",		       ha->board_name, i, SCpnt->device->channel, SCpnt->device->id,		       SCpnt->device->lun, SCpnt->pid);	cpp->reqsen = 1;	cpp->dispri = 1;#if 0	if (SCpnt->device->type == TYPE_TAPE)		cpp->hbaci = 1;#endif	cpp->one = 1;	cpp->channel = SCpnt->device->channel;	cpp->target = SCpnt->device->id;	cpp->lun = SCpnt->device->lun;	cpp->SCpnt = SCpnt;	memcpy(cpp->cdb, SCpnt->cmnd, SCpnt->cmd_len);	/* Use data transfer direction SCpnt->sc_data_direction */	scsi_to_dev_dir(i, ha);	/* Map DMA buffers and SG list */	map_dma(i, ha);	if (linked_comm && SCpnt->device->queue_depth > 2	    && TLDEV(SCpnt->device->type)) {		ha->cp_stat[i] = READY;		flush_dev(SCpnt->device, SCpnt->request->sector, ha, 0);		return 0;	}	/* Send control packet to the board */	if (do_dma(shost->io_port, cpp->cp_dma_addr, SEND_CP_DMA)) {		unmap_dma(i, ha);		SCpnt->host_scribble = NULL;		printk("%s: qcomm, target %d.%d:%d, pid %ld, adapter busy.\n",		       ha->board_name, SCpnt->device->channel, SCpnt->device->id,		       SCpnt->device->lun, SCpnt->pid);		return 1;	}	ha->cp_stat[i] = IN_USE;	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/017560fca496f72ed9dd734ffde63ce39dfe0411/eata.c/clean/drivers/scsi/eata.c