Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1c9fbafc authored by Martin K. Petersen's avatar Martin K. Petersen Committed by James Bottomley
Browse files

[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: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent 5a9ef25b
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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;
	}

+3 −10
Original line number Diff line number Diff line
@@ -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
+1 −2
Original line number Diff line number Diff line
@@ -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;
	}

+1 −2
Original line number Diff line number Diff line
@@ -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);
	}
+3 −3
Original line number Diff line number Diff line
@@ -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);
}
@@ -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;
		}
	}

@@ -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;
	}
Loading