else s = "bad sense key!"; 
void cdrom_analyze_sense_data(ide_drive_t *drive,			      struct request *failed_command,			      struct request_sense *sense){	if (!cdrom_log_sense(drive, failed_command, sense))		return;	/*	 * If a read toc is executed for a CD-R or CD-RW medium where	 * the first toc has not been recorded yet, it will fail with	 * 05/24/00 (which is a confusing error)	 */	if (failed_command && failed_command->cmd[0] == GPCMD_READ_TOC_PMA_ATIP)		if (sense->sense_key == 0x05 && sense->asc == 0x24)			return;#if VERBOSE_IDE_CD_ERRORS	{		int i;		const char *s;		char buf[80];		printk ("ATAPI device %s:\n", drive->name);		if (sense->error_code==0x70)			printk("  Error: ");		else if (sense->error_code==0x71)			printk("  Deferred Error: ");		else if (sense->error_code == 0x7f)			printk("  Vendor-specific Error: ");		else			printk("  Unknown Error Type: ");		if (sense->sense_key < ARY_LEN(sense_key_texts))			s = sense_key_texts[sense->sense_key];		else			s = "bad sense key!";		printk("%s -- (Sense key=0x%02x)\n", s, sense->sense_key);		if (sense->asc == 0x40) {			sprintf(buf, "Diagnostic failure on component 0x%02x",				 sense->ascq);			s = buf;		} else {			int lo = 0, mid, hi = ARY_LEN(sense_data_texts);			unsigned long key = (sense->sense_key << 16);			key |= (sense->asc << 8);			if (!(sense->ascq >= 0x80 && sense->ascq <= 0xdd))				key |= sense->ascq;			s = NULL;			while (hi > lo) {				mid = (lo + hi) / 2;				if (sense_data_texts[mid].asc_ascq == key ||				    sense_data_texts[mid].asc_ascq == (0xff0000|key)) {					s = sense_data_texts[mid].text;					break;				}				else if (sense_data_texts[mid].asc_ascq > key)					hi = mid;				else					lo = mid+1;			}		}		if (s == NULL) {			if (sense->asc > 0x80)				s = "(vendor-specific error)";			else				s = "(reserved error code)";		}		printk(KERN_ERR "  %s -- (asc=0x%02x, ascq=0x%02x)\n",			s, sense->asc, sense->ascq);		if (failed_command != NULL) {			int lo=0, mid, hi= ARY_LEN (packet_command_texts);			s = NULL;			while (hi > lo) {				mid = (lo + hi) / 2;				if (packet_command_texts[mid].packet_command ==				    failed_command->cmd[0]) {					s = packet_command_texts[mid].text;					break;				}				if (packet_command_texts[mid].packet_command >				    failed_command->cmd[0])					hi = mid;				else					lo = mid+1;			}			printk (KERN_ERR "  The failed \"%s\" packet command was: \n  \"", s);			for (i=0; i<sizeof (failed_command->cmd); i++)				printk ("%02x ", failed_command->cmd[i]);			printk ("\"\n");		}		/* The SKSV bit specifies validity of the sense_key_specific		 * in the next two commands. It is bit 7 of the first byte.		 * In the case of NOT_READY, if SKSV is set the drive can		 * give us nice ETA readings.		 */		if (sense->sense_key == NOT_READY && (sense->sks[0] & 0x80)) {			int progress = (sense->sks[1] << 8 | sense->sks[2]) * 100;			printk(KERN_ERR "  Command is %02d%% complete\n", progress / 0xffff);		}		if (sense->sense_key == ILLEGAL_REQUEST &&		    (sense->sks[0] & 0x80) != 0) {			printk(KERN_ERR "  Error in %s byte %d",				(sense->sks[0] & 0x40) != 0 ?				"command packet" : "command data",				(sense->sks[1] << 8) + sense->sks[2]);			if ((sense->sks[0] & 0x40) != 0)				printk (" bit %d", sense->sks[0] & 0x07);			printk ("\n");		}	}#else /* not VERBOSE_IDE_CD_ERRORS */	/* Suppress printing unit attention and `in progress of becoming ready'	   errors when we're not being verbose. */	if (sense->sense_key == UNIT_ATTENTION ||	    (sense->sense_key == NOT_READY && (sense->asc == 4 ||						sense->asc == 0x3a)))		return;	printk(KERN_ERR "%s: error code: 0x%02x  sense_key: 0x%02x  asc: 0x%02x  ascq: 0x%02x\n",		drive->name,		sense->error_code, sense->sense_key,		sense->asc, sense->ascq);#endif /* not VERBOSE_IDE_CD_ERRORS */}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/70d1d47c47c4643af357cb44d0d891c1b765f2ab/ide-cd.c/buggy/drivers/ide/ide-cd.c