diff options
author | dg <dg@FreeBSD.org> | 1995-02-15 07:44:07 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1995-02-15 07:44:07 +0000 |
commit | fecb08a9b5fb83c8ee12321bd21896058dc63107 (patch) | |
tree | 278d9fcd4439d2f1e1aa6a5dae68aa561f8cb600 /sys/scsi | |
parent | 15635ef7524498256911ea165861f20d2d7c6a92 (diff) | |
download | FreeBSD-src-fecb08a9b5fb83c8ee12321bd21896058dc63107.zip FreeBSD-src-fecb08a9b5fb83c8ee12321bd21896058dc63107.tar.gz |
>From a week or two ago I got kernel panics as soon as I tried to access my
tape drive. I traced it to sys/scsi/scsi_base.c where some code were added
to print the return values of the sense command. My tape drive returned a
extended flags value of 0x20, so the key that is the lower 4 bits, is 0.
The code uses "key-1" to index into a table and then the kernel go to never-
never land.
Here is a fix for this. Will somebody please apply it?
Submitted by: John Hay
Diffstat (limited to 'sys/scsi')
-rw-r--r-- | sys/scsi/scsi_base.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/scsi/scsi_base.c b/sys/scsi/scsi_base.c index fbb6e34..31fdbe6 100644 --- a/sys/scsi/scsi_base.c +++ b/sys/scsi/scsi_base.c @@ -8,7 +8,7 @@ * file. * * Written by Julian Elischer (julian@dialix.oz.au) - * $Id: scsi_base.c,v 1.18 1995/01/24 12:04:54 dufault Exp $ + * $Id: scsi_base.c,v 1.19 1995/01/31 11:41:44 dufault Exp $ */ #define SPLSD splbio @@ -661,7 +661,7 @@ void scsi_sense_print(xs) */ static char *sense_key_text[] = { - "RECOVERED ERROR", + "NO SENSE", "RECOVERED ERROR", "NOT READY", "MEDIUM ERROR", "HARDWARE FAILURE", "ILLEGAL REQUEST", "UNIT ATTENTION", "DATA PROTECT", @@ -686,7 +686,7 @@ void scsi_sense_print(xs) case 0x70: - printf("%s", sense_key_text[key - 1]); + printf("%s", sense_key_text[key]); info = ntohl(*((long *) ext->info)); if (sense->error_code & SSD_ERRCODE_VALID) { |