st_analyze_sense(STp->buffer->last_SRpnt, cmdstatp); 
st_analyze_sense(SRpnt, cmdstatp); 
static int st_chk_result(struct scsi_tape *STp, struct scsi_request * SRpnt){	int result = SRpnt->sr_result;	u8 scode;	DEB(const char *stp;)	char *name = tape_name(STp);	struct st_cmdstatus *cmdstatp;	if (!result)		return 0;	cmdstatp = &STp->buffer->cmdstat;	st_analyze_sense(STp->buffer->last_SRpnt, cmdstatp);	if (cmdstatp->have_sense)		scode = STp->buffer->cmdstat.sense_hdr.sense_key;	else		scode = 0;        DEB(        if (debugging) {                printk(ST_DEB_MSG "%s: Error: %x, cmd: %x %x %x %x %x %x Len: %d\n",		       name, result,		       SRpnt->sr_cmnd[0], SRpnt->sr_cmnd[1], SRpnt->sr_cmnd[2],		       SRpnt->sr_cmnd[3], SRpnt->sr_cmnd[4], SRpnt->sr_cmnd[5],		       SRpnt->sr_bufflen);		if (cmdstatp->have_sense)			scsi_print_req_sense("st", SRpnt);	} ) /* end DEB */	if (!debugging) { /* Abnormal conditions for tape */		if (!cmdstatp->have_sense)			printk(KERN_WARNING			       "%s: Error %x (sugg. bt 0x%x, driver bt 0x%x, host bt 0x%x).\n",			       name, result, suggestion(result),			       driver_byte(result) & DRIVER_MASK, host_byte(result));		else if (cmdstatp->have_sense &&			 scode != NO_SENSE &&			 scode != RECOVERED_ERROR &&			 /* scode != UNIT_ATTENTION && */			 scode != BLANK_CHECK &&			 scode != VOLUME_OVERFLOW &&			 SRpnt->sr_cmnd[0] != MODE_SENSE &&			 SRpnt->sr_cmnd[0] != TEST_UNIT_READY) {				printk(KERN_WARNING "%s: Error with sense data: ", name);				scsi_print_req_sense("st", SRpnt);		}	}	if (cmdstatp->fixed_format &&	    STp->cln_mode >= EXTENDED_SENSE_START) {  /* Only fixed format sense */		if (STp->cln_sense_value)			STp->cleaning_req |= ((SRpnt->sr_sense_buffer[STp->cln_mode] &					       STp->cln_sense_mask) == STp->cln_sense_value);		else			STp->cleaning_req |= ((SRpnt->sr_sense_buffer[STp->cln_mode] &					       STp->cln_sense_mask) != 0);	}	if (cmdstatp->have_sense &&	    cmdstatp->sense_hdr.asc == 0 && cmdstatp->sense_hdr.ascq == 0x17)		STp->cleaning_req = 1; /* ASC and ASCQ => cleaning requested */	STp->pos_unknown |= STp->device->was_reset;	if (cmdstatp->have_sense &&	    scode == RECOVERED_ERROR#if ST_RECOVERED_WRITE_FATAL	    && SRpnt->sr_cmnd[0] != WRITE_6	    && SRpnt->sr_cmnd[0] != WRITE_FILEMARKS#endif	    ) {		STp->recover_count++;		STp->recover_reg++;                DEB(		if (debugging) {			if (SRpnt->sr_cmnd[0] == READ_6)				stp = "read";			else if (SRpnt->sr_cmnd[0] == WRITE_6)				stp = "write";			else				stp = "ioctl";			printk(ST_DEB_MSG "%s: Recovered %s error (%d).\n", name, stp,			       STp->recover_count);		} ) /* end DEB */		if (cmdstatp->flags == 0)			return 0;	}	return (-EIO);}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/f03a567054fea4f9d43c50ec91338266c0bd588d/st.c/clean/drivers/scsi/st.c