aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/constants.c13
-rw-r--r--drivers/scsi/hptiop.c3
-rw-r--r--drivers/scsi/ips.c3
-rw-r--r--drivers/scsi/libfc/fc_fcp.c6
-rw-r--r--drivers/scsi/lpfc/lpfc_scsi.c6
-rw-r--r--drivers/scsi/st.c6
6 files changed, 14 insertions, 23 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
diff --git a/drivers/scsi/hptiop.c b/drivers/scsi/hptiop.c
index 34be88d7afa5..af1f0af0c5ac 100644
--- a/drivers/scsi/hptiop.c
+++ b/drivers/scsi/hptiop.c
@@ -580,8 +580,7 @@ static void hptiop_finish_scsi_req(struct hptiop_hba *hba, u32 tag,
580 break; 580 break;
581 581
582 default: 582 default:
583 scp->result = ((DRIVER_INVALID|SUGGEST_ABORT)<<24) | 583 scp->result = DRIVER_INVALID << 24 | DID_ABORT << 16;
584 (DID_ABORT<<16);
585 break; 584 break;
586 } 585 }
587 586
diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c
index ef683f0d2b5a..457d76a4cfe5 100644
--- a/drivers/scsi/ips.c
+++ b/drivers/scsi/ips.c
@@ -1004,8 +1004,7 @@ static int __ips_eh_reset(struct scsi_cmnd *SC)
1004 DEBUG_VAR(1, "(%s%d) Failing active commands", ips_name, ha->host_num); 1004 DEBUG_VAR(1, "(%s%d) Failing active commands", ips_name, ha->host_num);
1005 1005
1006 while ((scb = ips_removeq_scb_head(&ha->scb_activelist))) { 1006 while ((scb = ips_removeq_scb_head(&ha->scb_activelist))) {
1007 scb->scsi_cmd->result = 1007 scb->scsi_cmd->result = DID_RESET << 16;
1008 (DID_RESET << 16) | (SUGGEST_RETRY << 24);
1009 scb->scsi_cmd->scsi_done(scb->scsi_cmd); 1008 scb->scsi_cmd->scsi_done(scb->scsi_cmd);
1010 ips_freescb(ha, scb); 1009 ips_freescb(ha, scb);
1011 } 1010 }
diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c
index 2a631d7dbcec..a070e5712439 100644
--- a/drivers/scsi/libfc/fc_fcp.c
+++ b/drivers/scsi/libfc/fc_fcp.c
@@ -259,7 +259,7 @@ static void fc_fcp_retry_cmd(struct fc_fcp_pkt *fsp)
259 } 259 }
260 260
261 fsp->state &= ~FC_SRB_ABORT_PENDING; 261 fsp->state &= ~FC_SRB_ABORT_PENDING;
262 fsp->io_status = SUGGEST_RETRY << 24; 262 fsp->io_status = 0;
263 fsp->status_code = FC_ERROR; 263 fsp->status_code = FC_ERROR;
264 fc_fcp_complete_locked(fsp); 264 fc_fcp_complete_locked(fsp);
265} 265}
@@ -859,7 +859,7 @@ static void fc_fcp_complete_locked(struct fc_fcp_pkt *fsp)
859 (!(fsp->scsi_comp_flags & FCP_RESID_UNDER) || 859 (!(fsp->scsi_comp_flags & FCP_RESID_UNDER) ||
860 fsp->xfer_len < fsp->data_len - fsp->scsi_resid)) { 860 fsp->xfer_len < fsp->data_len - fsp->scsi_resid)) {
861 fsp->status_code = FC_DATA_UNDRUN; 861 fsp->status_code = FC_DATA_UNDRUN;
862 fsp->io_status = SUGGEST_RETRY << 24; 862 fsp->io_status = 0;
863 } 863 }
864 } 864 }
865 865
@@ -1267,7 +1267,7 @@ static void fc_fcp_rec(struct fc_fcp_pkt *fsp)
1267 rp = rport->dd_data; 1267 rp = rport->dd_data;
1268 if (!fsp->seq_ptr || rp->rp_state != RPORT_ST_READY) { 1268 if (!fsp->seq_ptr || rp->rp_state != RPORT_ST_READY) {
1269 fsp->status_code = FC_HRD_ERROR; 1269 fsp->status_code = FC_HRD_ERROR;
1270 fsp->io_status = SUGGEST_RETRY << 24; 1270 fsp->io_status = 0;
1271 fc_fcp_complete_locked(fsp); 1271 fc_fcp_complete_locked(fsp);
1272 return; 1272 return;
1273 } 1273 }
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index b103b6ed4970..b1bd3fc7bae8 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -1357,7 +1357,7 @@ lpfc_parse_bg_err(struct lpfc_hba *phba, struct lpfc_scsi_buf *lpfc_cmd,
1357 1357
1358 scsi_build_sense_buffer(1, cmd->sense_buffer, ILLEGAL_REQUEST, 1358 scsi_build_sense_buffer(1, cmd->sense_buffer, ILLEGAL_REQUEST,
1359 0x10, 0x1); 1359 0x10, 0x1);
1360 cmd->result = (DRIVER_SENSE|SUGGEST_DIE) << 24 1360 cmd->result = DRIVER_SENSE << 24
1361 | ScsiResult(DID_ABORT, SAM_STAT_CHECK_CONDITION); 1361 | ScsiResult(DID_ABORT, SAM_STAT_CHECK_CONDITION);
1362 phba->bg_guard_err_cnt++; 1362 phba->bg_guard_err_cnt++;
1363 printk(KERN_ERR "BLKGRD: guard_tag error\n"); 1363 printk(KERN_ERR "BLKGRD: guard_tag error\n");
@@ -1368,7 +1368,7 @@ lpfc_parse_bg_err(struct lpfc_hba *phba, struct lpfc_scsi_buf *lpfc_cmd,
1368 1368
1369 scsi_build_sense_buffer(1, cmd->sense_buffer, ILLEGAL_REQUEST, 1369 scsi_build_sense_buffer(1, cmd->sense_buffer, ILLEGAL_REQUEST,
1370 0x10, 0x3); 1370 0x10, 0x3);
1371 cmd->result = (DRIVER_SENSE|SUGGEST_DIE) << 24 1371 cmd->result = DRIVER_SENSE << 24
1372 | ScsiResult(DID_ABORT, SAM_STAT_CHECK_CONDITION); 1372 | ScsiResult(DID_ABORT, SAM_STAT_CHECK_CONDITION);
1373 1373
1374 phba->bg_reftag_err_cnt++; 1374 phba->bg_reftag_err_cnt++;
@@ -1380,7 +1380,7 @@ lpfc_parse_bg_err(struct lpfc_hba *phba, struct lpfc_scsi_buf *lpfc_cmd,
1380 1380
1381 scsi_build_sense_buffer(1, cmd->sense_buffer, ILLEGAL_REQUEST, 1381 scsi_build_sense_buffer(1, cmd->sense_buffer, ILLEGAL_REQUEST,
1382 0x10, 0x2); 1382 0x10, 0x2);
1383 cmd->result = (DRIVER_SENSE|SUGGEST_DIE) << 24 1383 cmd->result = DRIVER_SENSE << 24
1384 | ScsiResult(DID_ABORT, SAM_STAT_CHECK_CONDITION); 1384 | ScsiResult(DID_ABORT, SAM_STAT_CHECK_CONDITION);
1385 1385
1386 phba->bg_apptag_err_cnt++; 1386 phba->bg_apptag_err_cnt++;
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index c6f19ee8f2cb..eb24efea8f14 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -374,9 +374,9 @@ static int st_chk_result(struct scsi_tape *STp, struct st_request * SRpnt)
374 if (!debugging) { /* Abnormal conditions for tape */ 374 if (!debugging) { /* Abnormal conditions for tape */
375 if (!cmdstatp->have_sense) 375 if (!cmdstatp->have_sense)
376 printk(KERN_WARNING 376 printk(KERN_WARNING
377 "%s: Error %x (sugg. bt 0x%x, driver bt 0x%x, host bt 0x%x).\n", 377 "%s: Error %x (driver bt 0x%x, host bt 0x%x).\n",
378 name, result, suggestion(result), 378 name, result, driver_byte(result),
379 driver_byte(result) & DRIVER_MASK, host_byte(result)); 379 host_byte(result));
380 else if (cmdstatp->have_sense && 380 else if (cmdstatp->have_sense &&
381 scode != NO_SENSE && 381 scode != NO_SENSE &&
382 scode != RECOVERED_ERROR && 382 scode != RECOVERED_ERROR &&