aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/constants.c35
-rw-r--r--include/scsi/scsi_dbg.h1
2 files changed, 0 insertions, 36 deletions
diff --git a/drivers/scsi/constants.c b/drivers/scsi/constants.c
index 94c0642e2874..885c559164d0 100644
--- a/drivers/scsi/constants.c
+++ b/drivers/scsi/constants.c
@@ -433,41 +433,6 @@ void scsi_print_command(struct scsi_cmnd *cmd)
433} 433}
434EXPORT_SYMBOL(scsi_print_command); 434EXPORT_SYMBOL(scsi_print_command);
435 435
436/**
437 * scsi_print_status - print scsi status description
438 * @scsi_status: scsi status value
439 *
440 * If the status is recognized, the description is printed.
441 * Otherwise "Unknown status" is output. No trailing space.
442 * If CONFIG_SCSI_CONSTANTS is not set, then print status in hex
443 * (e.g. "0x2" for Check Condition).
444 **/
445void
446scsi_print_status(unsigned char scsi_status) {
447#ifdef CONFIG_SCSI_CONSTANTS
448 const char * ccp;
449
450 switch (scsi_status) {
451 case 0: ccp = "Good"; break;
452 case 0x2: ccp = "Check Condition"; break;
453 case 0x4: ccp = "Condition Met"; break;
454 case 0x8: ccp = "Busy"; break;
455 case 0x10: ccp = "Intermediate"; break;
456 case 0x14: ccp = "Intermediate-Condition Met"; break;
457 case 0x18: ccp = "Reservation Conflict"; break;
458 case 0x22: ccp = "Command Terminated"; break; /* obsolete */
459 case 0x28: ccp = "Task set Full"; break; /* was: Queue Full */
460 case 0x30: ccp = "ACA Active"; break;
461 case 0x40: ccp = "Task Aborted"; break;
462 default: ccp = "Unknown status";
463 }
464 printk(KERN_INFO "%s", ccp);
465#else
466 printk(KERN_INFO "0x%0x", scsi_status);
467#endif
468}
469EXPORT_SYMBOL(scsi_print_status);
470
471#ifdef CONFIG_SCSI_CONSTANTS 436#ifdef CONFIG_SCSI_CONSTANTS
472 437
473struct error_info { 438struct error_info {
diff --git a/include/scsi/scsi_dbg.h b/include/scsi/scsi_dbg.h
index 6cbd179a17cc..386474ee53a1 100644
--- a/include/scsi/scsi_dbg.h
+++ b/include/scsi/scsi_dbg.h
@@ -19,7 +19,6 @@ extern void __scsi_print_sense(const struct scsi_device *, const char *name,
19 int sense_len); 19 int sense_len);
20extern void scsi_show_result(int); 20extern void scsi_show_result(int);
21extern void scsi_print_result(struct scsi_cmnd *); 21extern void scsi_print_result(struct scsi_cmnd *);
22extern void scsi_print_status(unsigned char);
23extern const char *scsi_sense_key_string(unsigned char); 22extern const char *scsi_sense_key_string(unsigned char);
24extern const char *scsi_extd_sense_format(unsigned char, unsigned char, 23extern const char *scsi_extd_sense_format(unsigned char, unsigned char,
25 const char **); 24 const char **);