Device_ID, 1<<SCp->device->id); 
Device_ID, 1<<scmd_id(SCp)); 
NCR_700_start_command(struct scsi_cmnd *SCp){	struct NCR_700_command_slot *slot =		(struct NCR_700_command_slot *)SCp->host_scribble;	struct NCR_700_Host_Parameters *hostdata =		(struct NCR_700_Host_Parameters *)SCp->device->host->hostdata[0];	__u16 count = 1;	/* for IDENTIFY message */		if(hostdata->state != NCR_700_HOST_FREE) {		/* keep this inside the lock to close the race window where		 * the running command finishes on another CPU while we don't		 * change the state to queued on this one */		slot->state = NCR_700_SLOT_QUEUED;		DEBUG(("scsi%d: host busy, queueing command %p, slot %p\n",		       SCp->device->host->host_no, slot->cmnd, slot));		return 0;	}	hostdata->state = NCR_700_HOST_BUSY;	hostdata->cmd = SCp;	slot->state = NCR_700_SLOT_BUSY;	/* keep interrupts disabled until we have the command correctly	 * set up so we cannot take a selection interrupt */	hostdata->msgout[0] = NCR_700_identify(SCp->cmnd[0] != REQUEST_SENSE,					       SCp->device->lun);	/* for INQUIRY or REQUEST_SENSE commands, we cannot be sure	 * if the negotiated transfer parameters still hold, so	 * always renegotiate them */	if(SCp->cmnd[0] == INQUIRY || SCp->cmnd[0] == REQUEST_SENSE) {		NCR_700_clear_flag(SCp->device, NCR_700_DEV_NEGOTIATED_SYNC);	}	/* REQUEST_SENSE is asking for contingent I_T_L(_Q) status.	 * If a contingent allegiance condition exists, the device	 * will refuse all tags, so send the request sense as untagged	 * */	if((hostdata->tag_negotiated & (1<<SCp->device->id))	   && (slot->tag != SCSI_NO_TAG && SCp->cmnd[0] != REQUEST_SENSE)) {		count += scsi_populate_tag_msg(SCp, &hostdata->msgout[count]);	}	if(hostdata->fast &&	   NCR_700_is_flag_clear(SCp->device, NCR_700_DEV_NEGOTIATED_SYNC)) {		memcpy(&hostdata->msgout[count], NCR_700_SDTR_msg,		       sizeof(NCR_700_SDTR_msg));		hostdata->msgout[count+3] = spi_period(SCp->device->sdev_target);		hostdata->msgout[count+4] = spi_offset(SCp->device->sdev_target);		count += sizeof(NCR_700_SDTR_msg);		NCR_700_set_flag(SCp->device, NCR_700_DEV_BEGIN_SYNC_NEGOTIATION);	}	script_patch_16(hostdata->script, MessageCount, count);	script_patch_ID(hostdata->script,			Device_ID, 1<<SCp->device->id);	script_patch_32_abs(hostdata->script, CommandAddress, 			    slot->pCmd);	script_patch_16(hostdata->script, CommandCount, SCp->cmd_len);	/* finally plumb the beginning of the SG list into the script	 * */	script_patch_32_abs(hostdata->script, SGScriptStartAddress,			    to32bit(&slot->pSG[0].ins));	NCR_700_clear_fifo(SCp->device->host);	if(slot->resume_offset == 0)		slot->resume_offset = hostdata->pScript;	/* now perform all the writebacks and invalidates */	dma_cache_sync(hostdata->msgout, count, DMA_TO_DEVICE);	dma_cache_sync(hostdata->msgin, MSG_ARRAY_SIZE,		       DMA_FROM_DEVICE);	dma_cache_sync(SCp->cmnd, SCp->cmd_len, DMA_TO_DEVICE);	dma_cache_sync(hostdata->status, 1, DMA_FROM_DEVICE);	/* set the synchronous period/offset */	NCR_700_writeb(NCR_700_get_SXFER(SCp->device),		       SCp->device->host, SXFER_REG);	NCR_700_writel(slot->temp, SCp->device->host, TEMP_REG);	NCR_700_writel(slot->resume_offset, SCp->device->host, DSP_REG);	return 1;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/422c0d61d591cbfb70f029e13505fb437e169d68/53c700.c/buggy/drivers/scsi/53c700.c