Commit 54ec0ec3 authored by Andries E. Brouwer's avatar Andries E. Brouwer Committed by James Bottomley

[PATCH] Strange SCSI messages

In SCSI messages, sdsdd should have been sdd.
That is, these days error printing is a bit broken.
parent 71a12b57
...@@ -915,15 +915,15 @@ scsi_show_extd_sense(unsigned char asc, unsigned char ascq) { ...@@ -915,15 +915,15 @@ scsi_show_extd_sense(unsigned char asc, unsigned char ascq) {
/* Print sense information */ /* Print sense information */
static void static void
print_sense_internal(const char * devclass, print_sense_internal(const char *devclass,
const unsigned char * sense_buffer, const unsigned char *sense_buffer,
struct request *req) struct request *req)
{ {
int s, sense_class, valid, code, info; int s, sense_class, valid, code, info;
const char * error = NULL; const char *error = NULL;
unsigned char asc, ascq; unsigned char asc, ascq;
const char *sense_txt; const char *sense_txt;
char *name = req->rq_disk ? req->rq_disk->disk_name : "?"; const char *name = req->rq_disk ? req->rq_disk->disk_name : devclass;
sense_class = (sense_buffer[0] >> 4) & 0x07; sense_class = (sense_buffer[0] >> 4) & 0x07;
code = sense_buffer[0] & 0xf; code = sense_buffer[0] & 0xf;
...@@ -966,11 +966,9 @@ print_sense_internal(const char * devclass, ...@@ -966,11 +966,9 @@ print_sense_internal(const char * devclass,
sense_txt = scsi_sense_key_string(sense_buffer[2]); sense_txt = scsi_sense_key_string(sense_buffer[2]);
if (sense_txt) if (sense_txt)
printk("%s%s: sense key %s\n", printk("%s: sense key %s\n", name, sense_txt);
devclass, name, sense_txt);
else else
printk("%s%s: sense = %2x %2x\n", printk("%s: sense = %2x %2x\n", name,
devclass, name,
sense_buffer[0], sense_buffer[2]); sense_buffer[0], sense_buffer[2]);
asc = ascq = 0; asc = ascq = 0;
...@@ -993,11 +991,9 @@ print_sense_internal(const char * devclass, ...@@ -993,11 +991,9 @@ print_sense_internal(const char * devclass,
sense_txt = scsi_sense_key_string(sense_buffer[0]); sense_txt = scsi_sense_key_string(sense_buffer[0]);
if (sense_txt) if (sense_txt)
printk("%s%s: old sense key %s\n", printk("%s: old sense key %s\n", name, sense_txt);
devclass, name, sense_txt);
else else
printk("%s%s: sense = %2x %2x\n", printk("%s: sense = %2x %2x\n", name,
devclass, name,
sense_buffer[0], sense_buffer[2]); sense_buffer[0], sense_buffer[2]);
printk("Non-extended sense class %d code 0x%0x\n", printk("Non-extended sense class %d code 0x%0x\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment