Commit 9a6be750 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by James Bottomley

[PATCH] kill scsi_cmnd.flags

This was only used by the old error handling, the new code uses .eh_state
and .eh_eflags instead.
parent 621c48c3
......@@ -497,7 +497,6 @@ void scsi_init_cmd_from_req(struct scsi_cmnd *cmd, struct scsi_request *sreq)
cmd->serial_number_at_timeout = 0;
cmd->bufflen = sreq->sr_bufflen;
cmd->buffer = sreq->sr_buffer;
cmd->flags = 0;
cmd->retries = 0;
cmd->allowed = sreq->sr_allowed;
cmd->done = sreq->sr_done;
......
......@@ -124,27 +124,6 @@ extern const char *const scsi_device_types[MAX_SCSI_DEVICE_CODE];
#define SCSI_2 3
#define SCSI_3 4
/*
* Every SCSI command starts with a one byte OP-code.
* The next byte's high three bits are the LUN of the
* device. Any multi-byte quantities are stored high byte
* first, and may have a 5 bit MSB in the same byte
* as the LUN.
*/
/*
* As the scsi do command functions are intelligent, and may need to
* redo a command, we need to keep track of the last command
* executed on each one.
*/
#define WAS_RESET 0x01
#define WAS_TIMEDOUT 0x02
#define WAS_SENSE 0x04
#define IS_RESETTING 0x08
#define IS_ABORTING 0x10
#define ASKED_FOR_SENSE 0x20
#define SYNC_RESET 0x40
struct Scsi_Host;
struct scsi_cmnd;
......
......@@ -323,17 +323,6 @@ static int scsi_eh_completed_normally(struct scsi_cmnd *scmd)
* that would indicate what we need to do.
*/
if (host_byte(scmd->result) == DID_RESET) {
if (scmd->flags & IS_RESETTING) {
/*
* ok, this is normal. we don't know whether in fact
* the command in question really needs to be rerun
* or not - if this was the original data command then
* the answer is yes, otherwise we just flag it as
* SUCCESS.
*/
scmd->flags &= ~IS_RESETTING;
return NEEDS_RETRY;
}
/*
* rats. we are already in the error handler, so we now
* get to try and figure out what to do next. if the sense
......@@ -1217,14 +1206,6 @@ int scsi_decide_disposition(struct scsi_cmnd *scmd)
return FAILED;
}
case DID_RESET:
/*
* in the normal case where we haven't initiated a reset,
* this is a failure.
*/
if (scmd->flags & IS_RESETTING) {
scmd->flags &= ~IS_RESETTING;
goto maybe_retry;
}
return SUCCESS;
default:
return FAILED;
......
......@@ -260,7 +260,6 @@ static int scsi_init_cmd_errh(struct scsi_cmnd *cmd)
cmd->owner = SCSI_OWNER_MIDLEVEL;
cmd->serial_number = 0;
cmd->serial_number_at_timeout = 0;
cmd->flags = 0;
cmd->abort_reason = 0;
memset(cmd->sense_buffer, 0, sizeof cmd->sense_buffer);
......
......@@ -118,8 +118,6 @@ struct scsi_cmnd {
* received on original command
* (auto-sense) */
unsigned flags;
/* Low-level done function - can be used by low-level driver to point
* to completion function. Not used by mid/upper level code. */
void (*scsi_done) (struct scsi_cmnd *);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment