Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 136227
b: refs/heads/master
c: 1c9fbaf
h: refs/heads/master
i:
  136225: b48e772
  136223: 25e3993
v: v3
  • Loading branch information
Martin K. Petersen authored and James Bottomley committed Mar 12, 2009
1 parent d009788 commit e069e01
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 37 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5a9ef25b14d39b8413364df12cb8d9bb7a673a32
refs/heads/master: 1c9fbafc8c629c89183d6dccec67a8415513b0d1
1 change: 0 additions & 1 deletion trunk/drivers/s390/scsi/zfcp_fsf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2147,7 +2147,6 @@ static void zfcp_fsf_send_fcp_command_task_handler(struct zfcp_fsf_req *req)

if (unlikely(req->status & ZFCP_STATUS_FSFREQ_ABORTED)) {
set_host_byte(scpnt, DID_SOFT_ERROR);
set_driver_byte(scpnt, SUGGEST_RETRY);
goto skip_fsfstatus;
}

Expand Down
13 changes: 3 additions & 10 deletions trunk/drivers/scsi/constants.c
Original file line number Diff line number Diff line change
Expand Up @@ -1373,21 +1373,14 @@ static const char * const driverbyte_table[]={
"DRIVER_INVALID", "DRIVER_TIMEOUT", "DRIVER_HARD", "DRIVER_SENSE"};
#define NUM_DRIVERBYTE_STRS ARRAY_SIZE(driverbyte_table)

static const char * const driversuggest_table[]={"SUGGEST_OK",
"SUGGEST_RETRY", "SUGGEST_ABORT", "SUGGEST_REMAP", "SUGGEST_DIE",
"SUGGEST_5", "SUGGEST_6", "SUGGEST_7", "SUGGEST_SENSE"};
#define NUM_SUGGEST_STRS ARRAY_SIZE(driversuggest_table)

void scsi_show_result(int result)
{
int hb = host_byte(result);
int db = (driver_byte(result) & DRIVER_MASK);
int su = ((driver_byte(result) & SUGGEST_MASK) >> 4);
int db = driver_byte(result);

printk("Result: hostbyte=%s driverbyte=%s,%s\n",
printk("Result: hostbyte=%s driverbyte=%s\n",
(hb < NUM_HOSTBYTE_STRS ? hostbyte_table[hb] : "invalid"),
(db < NUM_DRIVERBYTE_STRS ? driverbyte_table[db] : "invalid"),
(su < NUM_SUGGEST_STRS ? driversuggest_table[su] : "invalid"));
(db < NUM_DRIVERBYTE_STRS ? driverbyte_table[db] : "invalid"));
}

#else
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/scsi/hptiop.c
Original file line number Diff line number Diff line change
Expand Up @@ -580,8 +580,7 @@ static void hptiop_finish_scsi_req(struct hptiop_hba *hba, u32 tag,
break;

default:
scp->result = ((DRIVER_INVALID|SUGGEST_ABORT)<<24) |
(DID_ABORT<<16);
scp->result = DRIVER_INVALID << 24 | DID_ABORT << 16;
break;
}

Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/scsi/ips.c
Original file line number Diff line number Diff line change
Expand Up @@ -1004,8 +1004,7 @@ static int __ips_eh_reset(struct scsi_cmnd *SC)
DEBUG_VAR(1, "(%s%d) Failing active commands", ips_name, ha->host_num);

while ((scb = ips_removeq_scb_head(&ha->scb_activelist))) {
scb->scsi_cmd->result =
(DID_RESET << 16) | (SUGGEST_RETRY << 24);
scb->scsi_cmd->result = DID_RESET << 16;
scb->scsi_cmd->scsi_done(scb->scsi_cmd);
ips_freescb(ha, scb);
}
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/scsi/libfc/fc_fcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ static void fc_fcp_retry_cmd(struct fc_fcp_pkt *fsp)
}

fsp->state &= ~FC_SRB_ABORT_PENDING;
fsp->io_status = SUGGEST_RETRY << 24;
fsp->io_status = 0;
fsp->status_code = FC_ERROR;
fc_fcp_complete_locked(fsp);
}
Expand Down Expand Up @@ -859,7 +859,7 @@ static void fc_fcp_complete_locked(struct fc_fcp_pkt *fsp)
(!(fsp->scsi_comp_flags & FCP_RESID_UNDER) ||
fsp->xfer_len < fsp->data_len - fsp->scsi_resid)) {
fsp->status_code = FC_DATA_UNDRUN;
fsp->io_status = SUGGEST_RETRY << 24;
fsp->io_status = 0;
}
}

Expand Down Expand Up @@ -1267,7 +1267,7 @@ static void fc_fcp_rec(struct fc_fcp_pkt *fsp)
rp = rport->dd_data;
if (!fsp->seq_ptr || rp->rp_state != RPORT_ST_READY) {
fsp->status_code = FC_HRD_ERROR;
fsp->io_status = SUGGEST_RETRY << 24;
fsp->io_status = 0;
fc_fcp_complete_locked(fsp);
return;
}
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/scsi/lpfc/lpfc_scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1357,7 +1357,7 @@ lpfc_parse_bg_err(struct lpfc_hba *phba, struct lpfc_scsi_buf *lpfc_cmd,

scsi_build_sense_buffer(1, cmd->sense_buffer, ILLEGAL_REQUEST,
0x10, 0x1);
cmd->result = (DRIVER_SENSE|SUGGEST_DIE) << 24
cmd->result = DRIVER_SENSE << 24
| ScsiResult(DID_ABORT, SAM_STAT_CHECK_CONDITION);
phba->bg_guard_err_cnt++;
printk(KERN_ERR "BLKGRD: guard_tag error\n");
Expand All @@ -1368,7 +1368,7 @@ lpfc_parse_bg_err(struct lpfc_hba *phba, struct lpfc_scsi_buf *lpfc_cmd,

scsi_build_sense_buffer(1, cmd->sense_buffer, ILLEGAL_REQUEST,
0x10, 0x3);
cmd->result = (DRIVER_SENSE|SUGGEST_DIE) << 24
cmd->result = DRIVER_SENSE << 24
| ScsiResult(DID_ABORT, SAM_STAT_CHECK_CONDITION);

phba->bg_reftag_err_cnt++;
Expand All @@ -1380,7 +1380,7 @@ lpfc_parse_bg_err(struct lpfc_hba *phba, struct lpfc_scsi_buf *lpfc_cmd,

scsi_build_sense_buffer(1, cmd->sense_buffer, ILLEGAL_REQUEST,
0x10, 0x2);
cmd->result = (DRIVER_SENSE|SUGGEST_DIE) << 24
cmd->result = DRIVER_SENSE << 24
| ScsiResult(DID_ABORT, SAM_STAT_CHECK_CONDITION);

phba->bg_apptag_err_cnt++;
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/scsi/st.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,9 +374,9 @@ static int st_chk_result(struct scsi_tape *STp, struct st_request * SRpnt)
if (!debugging) { /* Abnormal conditions for tape */
if (!cmdstatp->have_sense)
printk(KERN_WARNING
"%s: Error %x (sugg. bt 0x%x, driver bt 0x%x, host bt 0x%x).\n",
name, result, suggestion(result),
driver_byte(result) & DRIVER_MASK, host_byte(result));
"%s: Error %x (driver bt 0x%x, host bt 0x%x).\n",
name, result, driver_byte(result),
host_byte(result));
else if (cmdstatp->have_sense &&
scode != NO_SENSE &&
scode != RECOVERED_ERROR &&
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/usb/storage/transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ void usb_stor_invoke_transport(struct scsi_cmnd *srb, struct us_data *us)
/* Did we transfer less than the minimum amount required? */
if ((srb->result == SAM_STAT_GOOD || srb->sense_buffer[2] == 0) &&
scsi_bufflen(srb) - scsi_get_resid(srb) < srb->underflow)
srb->result = (DID_ERROR << 16) | (SUGGEST_RETRY << 24);
srb->result = DID_ERROR << 16;

last_sector_hacks(us, srb);
return;
Expand Down
11 changes: 0 additions & 11 deletions trunk/include/scsi/scsi.h
Original file line number Diff line number Diff line change
Expand Up @@ -402,16 +402,6 @@ static inline int scsi_is_wlun(unsigned int lun)
#define DRIVER_HARD 0x07
#define DRIVER_SENSE 0x08

#define SUGGEST_RETRY 0x10
#define SUGGEST_ABORT 0x20
#define SUGGEST_REMAP 0x30
#define SUGGEST_DIE 0x40
#define SUGGEST_SENSE 0x80
#define SUGGEST_IS_OK 0xff

#define DRIVER_MASK 0x0f
#define SUGGEST_MASK 0xf0

/*
* Internal return values.
*/
Expand Down Expand Up @@ -447,7 +437,6 @@ static inline int scsi_is_wlun(unsigned int lun)
#define msg_byte(result) (((result) >> 8) & 0xff)
#define host_byte(result) (((result) >> 16) & 0xff)
#define driver_byte(result) (((result) >> 24) & 0xff)
#define suggestion(result) (driver_byte(result) & SUGGEST_MASK)

static inline void set_msg_byte(struct scsi_cmnd *cmd, char status)
{
Expand Down

0 comments on commit e069e01

Please sign in to comment.