diff options
author | Martin K. Petersen <martin.petersen@oracle.com> | 2009-01-04 03:14:11 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-03-12 13:58:02 -0400 |
commit | 1c9fbafc8c629c89183d6dccec67a8415513b0d1 (patch) | |
tree | 895ca90bbf8255568d691b6603414e15b4161887 | |
parent | 5a9ef25b14d39b8413364df12cb8d9bb7a673a32 (diff) |
[SCSI] Remove SUGGEST flags
The SUGGEST_* flags in the SCSI command result have been out of fashion
for a while and we don't actually use them in the error handling.
Remove the remaining occurrences.
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
-rw-r--r-- | drivers/s390/scsi/zfcp_fsf.c | 1 | ||||
-rw-r--r-- | drivers/scsi/constants.c | 13 | ||||
-rw-r--r-- | drivers/scsi/hptiop.c | 3 | ||||
-rw-r--r-- | drivers/scsi/ips.c | 3 | ||||
-rw-r--r-- | drivers/scsi/libfc/fc_fcp.c | 6 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_scsi.c | 6 | ||||
-rw-r--r-- | drivers/scsi/st.c | 6 | ||||
-rw-r--r-- | drivers/usb/storage/transport.c | 2 | ||||
-rw-r--r-- | include/scsi/scsi.h | 11 |
9 files changed, 15 insertions, 36 deletions
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index e6416f8541b0..babe1b8ba25e 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c | |||
@@ -2147,7 +2147,6 @@ static void zfcp_fsf_send_fcp_command_task_handler(struct zfcp_fsf_req *req) | |||
2147 | 2147 | ||
2148 | if (unlikely(req->status & ZFCP_STATUS_FSFREQ_ABORTED)) { | 2148 | if (unlikely(req->status & ZFCP_STATUS_FSFREQ_ABORTED)) { |
2149 | set_host_byte(scpnt, DID_SOFT_ERROR); | 2149 | set_host_byte(scpnt, DID_SOFT_ERROR); |
2150 | set_driver_byte(scpnt, SUGGEST_RETRY); | ||
2151 | goto skip_fsfstatus; | 2150 | goto skip_fsfstatus; |
2152 | } | 2151 | } |
2153 | 2152 | ||
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 | ||
1376 | static 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 | |||
1381 | void scsi_show_result(int result) | 1376 | void 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 && |
diff --git a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c index fb65d221cedf..02e30a3ce7bf 100644 --- a/drivers/usb/storage/transport.c +++ b/drivers/usb/storage/transport.c | |||
@@ -781,7 +781,7 @@ void usb_stor_invoke_transport(struct scsi_cmnd *srb, struct us_data *us) | |||
781 | /* Did we transfer less than the minimum amount required? */ | 781 | /* Did we transfer less than the minimum amount required? */ |
782 | if ((srb->result == SAM_STAT_GOOD || srb->sense_buffer[2] == 0) && | 782 | if ((srb->result == SAM_STAT_GOOD || srb->sense_buffer[2] == 0) && |
783 | scsi_bufflen(srb) - scsi_get_resid(srb) < srb->underflow) | 783 | scsi_bufflen(srb) - scsi_get_resid(srb) < srb->underflow) |
784 | srb->result = (DID_ERROR << 16) | (SUGGEST_RETRY << 24); | 784 | srb->result = DID_ERROR << 16; |
785 | 785 | ||
786 | last_sector_hacks(us, srb); | 786 | last_sector_hacks(us, srb); |
787 | return; | 787 | return; |
diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h index a109165714d6..815d4047c4ce 100644 --- a/include/scsi/scsi.h +++ b/include/scsi/scsi.h | |||
@@ -402,16 +402,6 @@ static inline int scsi_is_wlun(unsigned int lun) | |||
402 | #define DRIVER_HARD 0x07 | 402 | #define DRIVER_HARD 0x07 |
403 | #define DRIVER_SENSE 0x08 | 403 | #define DRIVER_SENSE 0x08 |
404 | 404 | ||
405 | #define SUGGEST_RETRY 0x10 | ||
406 | #define SUGGEST_ABORT 0x20 | ||
407 | #define SUGGEST_REMAP 0x30 | ||
408 | #define SUGGEST_DIE 0x40 | ||
409 | #define SUGGEST_SENSE 0x80 | ||
410 | #define SUGGEST_IS_OK 0xff | ||
411 | |||
412 | #define DRIVER_MASK 0x0f | ||
413 | #define SUGGEST_MASK 0xf0 | ||
414 | |||
415 | /* | 405 | /* |
416 | * Internal return values. | 406 | * Internal return values. |
417 | */ | 407 | */ |
@@ -447,7 +437,6 @@ static inline int scsi_is_wlun(unsigned int lun) | |||
447 | #define msg_byte(result) (((result) >> 8) & 0xff) | 437 | #define msg_byte(result) (((result) >> 8) & 0xff) |
448 | #define host_byte(result) (((result) >> 16) & 0xff) | 438 | #define host_byte(result) (((result) >> 16) & 0xff) |
449 | #define driver_byte(result) (((result) >> 24) & 0xff) | 439 | #define driver_byte(result) (((result) >> 24) & 0xff) |
450 | #define suggestion(result) (driver_byte(result) & SUGGEST_MASK) | ||
451 | 440 | ||
452 | static inline void set_msg_byte(struct scsi_cmnd *cmd, char status) | 441 | static inline void set_msg_byte(struct scsi_cmnd *cmd, char status) |
453 | { | 442 | { |