printk(KERN_INFO "scsi_debug:    <%u %u %u %u> " "non-zero result=0x%x\n", sdp->host->host_no, sdp->channel, sdp->id, sdp->lun, scsi_result); 
sdev_printk(KERN_INFO, sdp, "non-zero result=0x%x\n", scsi_result); 
static int schedule_resp(struct scsi_cmnd * cmnd,			 struct sdebug_dev_info * devip,			 done_funct_t done, int scsi_result, int delta_jiff){	if ((SCSI_DEBUG_OPT_NOISE & scsi_debug_opts) && cmnd) {		if (scsi_result) {			struct scsi_device * sdp = cmnd->device;			printk(KERN_INFO "scsi_debug:    <%u %u %u %u> "			       "non-zero result=0x%x\n", sdp->host->host_no,			       sdp->channel, sdp->id, sdp->lun, scsi_result);		}	}	if (cmnd && devip) {		/* simulate autosense by this driver */		if (SAM_STAT_CHECK_CONDITION == (scsi_result & 0xff))			memcpy(cmnd->sense_buffer, devip->sense_buff,			       (SCSI_SENSE_BUFFERSIZE > SDEBUG_SENSE_LEN) ?			       SDEBUG_SENSE_LEN : SCSI_SENSE_BUFFERSIZE);	}	if (delta_jiff <= 0) {		if (cmnd)			cmnd->result = scsi_result;		if (done)			done(cmnd);		return 0;	} else {		unsigned long iflags;		int k;		struct sdebug_queued_cmd * sqcp = NULL;		spin_lock_irqsave(&queued_arr_lock, iflags);		for (k = 0; k < SCSI_DEBUG_CANQUEUE; ++k) {			sqcp = &queued_arr[k];			if (! sqcp->in_use)				break;		}		if (k >= SCSI_DEBUG_CANQUEUE) {			spin_unlock_irqrestore(&queued_arr_lock, iflags);			printk(KERN_WARNING "scsi_debug: can_queue exceeded\n");			return 1;	/* report busy to mid level */		}		sqcp->in_use = 1;		sqcp->a_cmnd = cmnd;		sqcp->scsi_result = scsi_result;		sqcp->done_funct = done;		sqcp->cmnd_timer.function = timer_intr_handler;		sqcp->cmnd_timer.data = k;		sqcp->cmnd_timer.expires = jiffies + delta_jiff;		add_timer(&sqcp->cmnd_timer);		spin_unlock_irqrestore(&queued_arr_lock, iflags);		if (cmnd)			cmnd->result = 0;		return 0;	}}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/3bf743e7c891d8be8295650b7a6a9b5af083b096/scsi_debug.c/clean/drivers/scsi/scsi_debug.c