mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-14 10:09:48 +00:00
>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
This commit is contained in:
parent
37c4acbb58
commit
2f8f2dd5bb
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=6433
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user