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.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/scsi/constants.c b/drivers/scsi/constants.c
index 4003deefb7d8..e79e18101f87 100644
--- a/drivers/scsi/constants.c
+++ b/drivers/scsi/constants.c
@@ -1373,21 +1373,14 @@ static const char * const driverbyte_table[]={
1373"DRIVER_INVALID", "DRIVER_TIMEOUT", "DRIVER_HARD", "DRIVER_SENSE"}; 1373"DRIVER_INVALID", "DRIVER_TIMEOUT", "DRIVER_HARD", "DRIVER_SENSE"};
1374#define NUM_DRIVERBYTE_STRS ARRAY_SIZE(driverbyte_table) 1374#define NUM_DRIVERBYTE_STRS ARRAY_SIZE(driverbyte_table)
1375 1375
1376static const char * const driversuggest_table[]={"SUGGEST_OK",
1377"SUGGEST_RETRY", "SUGGEST_ABORT", "SUGGEST_REMAP", "SUGGEST_DIE",
1378"SUGGEST_5", "SUGGEST_6", "SUGGEST_7", "SUGGEST_SENSE"};
1379#define NUM_SUGGEST_STRS ARRAY_SIZE(driversuggest_table)
1380
1381void scsi_show_result(int result) 1376void scsi_show_result(int result)
1382{ 1377{
1383 int hb = host_byte(result); 1378 int hb = host_byte(result);
1384 int db = (driver_byte(result) & DRIVER_MASK); 1379 int db = driver_byte(result);
1385 int su = ((driver_byte(result) & SUGGEST_MASK) >> 4);
1386 1380
1387 printk("Result: hostbyte=%s driverbyte=%s,%s\n", 1381 printk("Result: hostbyte=%s driverbyte=%s\n",
1388 (hb < NUM_HOSTBYTE_STRS ? hostbyte_table[hb] : "invalid"), 1382 (hb < NUM_HOSTBYTE_STRS ? hostbyte_table[hb] : "invalid"),
1389 (db < NUM_DRIVERBYTE_STRS ? driverbyte_table[db] : "invalid"), 1383 (db < NUM_DRIVERBYTE_STRS ? driverbyte_table[db] : "invalid"));
1390 (su < NUM_SUGGEST_STRS ? driversuggest_table[su] : "invalid"));
1391} 1384}
1392 1385
1393#else 1386#else