#endif 
int fcp_scsi_dev_reset(Scsi_Cmnd *SCpnt){#if 0 /* broken junk, but if davem wants to compile this driver, let him.. */	unsigned long flags;	fcp_cmd *cmd;	fcp_cmnd *fcmd;	fc_channel *fc = FC_SCMND(SCpnt);        DECLARE_MUTEX_LOCKED(sem);	if (!fc->rst_pkt) {		fc->rst_pkt = (Scsi_Cmnd *) kmalloc(sizeof(SCpnt), GFP_KERNEL);		if (!fc->rst_pkt) return FAILED;				fcmd = FCP_CMND(fc->rst_pkt);		fcmd->token = 0;		cmd = fc->scsi_cmd_pool + 0;		FCD(("Preparing rst packet\n"))		fc->encode_addr (SCpnt, cmd->fcp_addr, fc, fcmd);		fc->rst_pkt->device = SCpnt->device;		fc->rst_pkt->cmd_len = 0;				fc->cmd_slots[0] = fcmd;		cmd->fcp_cntl = FCP_CNTL_QTYPE_ORDERED | FCP_CNTL_RESET;		fcmd->data = (dma_addr_t)NULL;		fcmd->proto = TYPE_SCSI_FCP;		memcpy (cmd->fcp_cdb, SCpnt->cmnd, SCpnt->cmd_len);		memset (cmd->fcp_cdb+SCpnt->cmd_len, 0, sizeof(cmd->fcp_cdb)-SCpnt->cmd_len);		FCD(("XXX: %04x.%04x.%04x.%04x - %08x%08x%08x\n", cmd->fcp_addr[0], cmd->fcp_addr[1], cmd->fcp_addr[2], cmd->fcp_addr[3], *(u32 *)SCpnt->cmnd, *(u32 *)(SCpnt->cmnd+4), *(u32 *)(SCpnt->cmnd+8)))	} else {		fcmd = FCP_CMND(fc->rst_pkt);		if (fc->rst_pkt->eh_state == SCSI_STATE_QUEUED)			return FAILED; /* or SUCCESS. Only these */	}	fc->rst_pkt->done = NULL;        fc->rst_pkt->eh_state = SCSI_STATE_QUEUED;	init_timer(&fc->rst_pkt->eh_timeout);	fc->rst_pkt->eh_timeout.data = (unsigned long) fc->rst_pkt;	fc->rst_pkt->eh_timeout.expires = jiffies + FCP_RESET_TIMEOUT;	fc->rst_pkt->eh_timeout.function = (void (*)(unsigned long))fcp_scsi_reset_done;        add_timer(&fc->rst_pkt->eh_timeout);	/*	 * Set up the semaphore so we wait for the command to complete.	 */	fc->rst_pkt->device->host->eh_action = &sem;	fc->rst_pkt->request->rq_status = RQ_SCSI_BUSY;	fc->rst_pkt->done = fcp_scsi_reset_done;	spin_lock_irqsave(SCpnt->device->host->host_lock, flags);	fcp_scsi_queue_it(fc, fc->rst_pkt, fcmd, 0);	spin_unlock_irqrestore(SCpnt->device->host->host_lock, flags);		down(&sem);	fc->rst_pkt->device->host->eh_action = NULL;	del_timer(&fc->rst_pkt->eh_timeout);	/*	 * See if timeout.  If so, tell the host to forget about it.	 * In other words, we don't want a callback any more.	 */	if (fc->rst_pkt->eh_state == SCSI_STATE_TIMEOUT ) {		fc->rst_pkt->eh_state = SCSI_STATE_UNUSED;		return FAILED;	}	fc->rst_pkt->eh_state = SCSI_STATE_UNUSED;	return SUCCESS;#endif}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/e572f7cc28a0b01b96ede3f78f448ad55c5e67ad/fc.c/clean/drivers/fc4/fc.c