/* Target busy */ if (scsi_status & SS_BUSY_CONDITION && scsi_status != SS_RESERVE_CONFLICT) { CMD_RESULT(cmd) = DID_BUS_BUSY << 16 | (scsi_status & 0xff); 
/* Target busy or queue full */ if ((scsi_status & 0xFF) == SAM_STAT_TASK_SET_FULL || (scsi_status & 0xFF) == SAM_STAT_BUSY) { CMD_RESULT(cmd) = scsi_status & 0xff; 
qla1280_status_entry(struct scsi_qla_host *ha, struct response *pkt,		     struct list_head *done_q){	unsigned int bus, target, lun;	int sense_sz;	struct srb *sp;	struct scsi_cmnd *cmd;	uint32_t handle = le32_to_cpu(pkt->handle);	uint16_t scsi_status = le16_to_cpu(pkt->scsi_status);	uint16_t comp_status = le16_to_cpu(pkt->comp_status);	ENTER("qla1280_status_entry");	/* Validate handle. */	if (handle < MAX_OUTSTANDING_COMMANDS)		sp = ha->outstanding_cmds[handle];	else		sp = NULL;	if (!sp) {		printk(KERN_WARNING "qla1280: Status Entry invalid handle\n");		goto out;	}	/* Free outstanding command slot. */	ha->outstanding_cmds[handle] = NULL;	cmd = sp->cmd;	/* Generate LU queue on cntrl, target, LUN */	bus = SCSI_BUS_32(cmd);	target = SCSI_TCN_32(cmd);	lun = SCSI_LUN_32(cmd);	if (comp_status || scsi_status) {		dprintk(3, "scsi: comp_status = 0x%x, scsi_status = "			"0x%x, handle = 0x%x\n", comp_status,			scsi_status, handle);	}	/* Target busy */	if (scsi_status & SS_BUSY_CONDITION &&	    scsi_status != SS_RESERVE_CONFLICT) {		CMD_RESULT(cmd) =			DID_BUS_BUSY << 16 | (scsi_status & 0xff);	} else {		/* Save ISP completion status */		CMD_RESULT(cmd) = qla1280_return_status(pkt, cmd);		if (scsi_status & SS_CHECK_CONDITION) {			if (comp_status != CS_ARS_FAILED) {				uint16_t req_sense_length =					le16_to_cpu(pkt->req_sense_length);				if (req_sense_length < CMD_SNSLEN(cmd))					sense_sz = req_sense_length;				else					/*					 * scsi_cmnd->sense_buffer is					 * 64 bytes, why only copy 63?					 * This looks wrong! /Jes					 */					sense_sz = CMD_SNSLEN(cmd) - 1;				memcpy(cmd->sense_buffer,				       &pkt->req_sense_data, sense_sz);			} else				sense_sz = 0;			memset(cmd->sense_buffer + sense_sz, 0,			       sizeof(cmd->sense_buffer) - sense_sz);			dprintk(2, "qla1280_status_entry: Check "				"condition Sense data, b %i, t %i, "				"l %i\n", bus, target, lun);			if (sense_sz)				qla1280_dump_buffer(2,						    (char *)cmd->sense_buffer,						    sense_sz);		}	}	/* Place command on done queue. */	list_add_tail(&sp->list, done_q); out:	LEAVE("qla1280_status_entry");}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/7d0e11fb20b08790c71f5336b493662f952641c9/qla1280.c/buggy/drivers/scsi/qla1280.c