aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/constants.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/constants.c')
-rw-r--r--drivers/scsi/constants.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/scsi/constants.c b/drivers/scsi/constants.c
index 2a458d66b6ff..024553f9c247 100644
--- a/drivers/scsi/constants.c
+++ b/drivers/scsi/constants.c
@@ -1235,7 +1235,21 @@ scsi_print_sense_hdr(const char *name, struct scsi_sense_hdr *sshdr)
1235} 1235}
1236EXPORT_SYMBOL(scsi_print_sense_hdr); 1236EXPORT_SYMBOL(scsi_print_sense_hdr);
1237 1237
1238/*
1239 * Print normalized SCSI sense header with device information and a prefix.
1240 */
1238void 1241void
1242scsi_cmd_print_sense_hdr(struct scsi_cmnd *scmd, const char *desc,
1243 struct scsi_sense_hdr *sshdr)
1244{
1245 scmd_printk(KERN_INFO, scmd, "%s: ", desc);
1246 scsi_show_sense_hdr(sshdr);
1247 scmd_printk(KERN_INFO, scmd, "%s: ", desc);
1248 scsi_show_extd_sense(sshdr->asc, sshdr->ascq);
1249}
1250EXPORT_SYMBOL(scsi_cmd_print_sense_hdr);
1251
1252static void
1239scsi_decode_sense_buffer(const unsigned char *sense_buffer, int sense_len, 1253scsi_decode_sense_buffer(const unsigned char *sense_buffer, int sense_len,
1240 struct scsi_sense_hdr *sshdr) 1254 struct scsi_sense_hdr *sshdr)
1241{ 1255{
@@ -1258,7 +1272,7 @@ scsi_decode_sense_buffer(const unsigned char *sense_buffer, int sense_len,
1258 } 1272 }
1259} 1273}
1260 1274
1261void 1275static void
1262scsi_decode_sense_extras(const unsigned char *sense_buffer, int sense_len, 1276scsi_decode_sense_extras(const unsigned char *sense_buffer, int sense_len,
1263 struct scsi_sense_hdr *sshdr) 1277 struct scsi_sense_hdr *sshdr)
1264{ 1278{