Commit 22aab371 authored by Christoph Hellwig's avatar Christoph Hellwig

[PATCH] remove dead scsi_cmnd members

->reset_chain is initialized by the midlayer only used in BusLogic's old EH
code (which is never called and thus can be #if 0'ed out until someone with
the hardware updates it to new EH), ->done_late is never used.
parent 184eb8ff
......@@ -3213,6 +3213,7 @@ static void BusLogic_ProcessCompletedCCBs(BusLogic_HostAdapter_T *HostAdapter)
Place CCB back on the Host Adapter's free list.
*/
BusLogic_DeallocateCCB(CCB);
#if 0 /* this needs to be redone different for new EH */
/*
Bus Device Reset CCBs have the Command field non-NULL only when a
Bus Device Reset was requested for a Command that did not have a
......@@ -3228,6 +3229,7 @@ static void BusLogic_ProcessCompletedCCBs(BusLogic_HostAdapter_T *HostAdapter)
Command->scsi_done(Command);
Command = NextCommand;
}
#endif
/*
Iterate over the CCBs for this Host Adapter performing completion
processing for any CCBs marked as Reset for this Target.
......@@ -3948,6 +3950,7 @@ static int BusLogic_ResetHostAdapter(BusLogic_HostAdapter_T *HostAdapter,
{
Command = CCB->Command;
BusLogic_DeallocateCCB(CCB);
#if 0 /* this needs to be redone different for new EH */
while (Command != NULL)
{
SCSI_Command_T *NextCommand = Command->reset_chain;
......@@ -3956,6 +3959,7 @@ static int BusLogic_ResetHostAdapter(BusLogic_HostAdapter_T *HostAdapter,
Command->scsi_done(Command);
Command = NextCommand;
}
#endif
}
for (TargetID = 0; TargetID < HostAdapter->MaxTargetDevices; TargetID++)
{
......@@ -3967,7 +3971,7 @@ static int BusLogic_ResetHostAdapter(BusLogic_HostAdapter_T *HostAdapter,
return Result;
}
#if 0 /* old-style EH code references a dead struct scsi_cmnd member */
/*
BusLogic_SendBusDeviceReset sends a Bus Device Reset to the Target
Device associated with Command.
......@@ -4204,6 +4208,7 @@ int BusLogic_ResetCommand(SCSI_Command_T *Command, unsigned int ResetFlags)
}
return SCSI_RESET_PUNT;
}
#endif
/*
......
......@@ -537,7 +537,6 @@ void scsi_init_cmd_from_req(struct scsi_cmnd *cmd, struct scsi_request *sreq)
cmd->request = sreq->sr_request;
memcpy(cmd->data_cmnd, sreq->sr_cmnd, sizeof(cmd->data_cmnd));
cmd->reset_chain = NULL;
cmd->serial_number = 0;
cmd->serial_number_at_timeout = 0;
cmd->bufflen = sreq->sr_bufflen;
......
......@@ -476,7 +476,6 @@ struct scsi_cmnd {
unsigned short state;
unsigned short owner;
Scsi_Request *sc_request;
struct scsi_cmnd *reset_chain;
struct list_head list; /* scsi_cmnd participates in queue lists */
......@@ -561,14 +560,6 @@ struct scsi_cmnd {
unsigned flags;
/*
* Used to indicate that a command which has timed out also
* completed normally. Typically the completion function will
* do nothing but set this flag in this instance because the
* timeout handler is already running.
*/
unsigned done_late:1;
/* 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 *);
......
......@@ -1661,13 +1661,10 @@ scsi_reset_provider(struct scsi_device *dev, int flag)
scmd->scsi_done = scsi_reset_provider_done_command;
scmd->done = NULL;
scmd->reset_chain = NULL;
scmd->buffer = NULL;
scmd->bufflen = 0;
scmd->request_buffer = NULL;
scmd->request_bufflen = 0;
scmd->internal_timeout = NORMAL_TIMEOUT;
scmd->abort_reason = DID_ABORT;
......
......@@ -274,7 +274,6 @@ void scsi_wait_req(struct scsi_request *sreq, const void *cmnd, void *buffer,
static int scsi_init_cmd_errh(struct scsi_cmnd *cmd)
{
cmd->owner = SCSI_OWNER_MIDLEVEL;
cmd->reset_chain = NULL;
cmd->serial_number = 0;
cmd->serial_number_at_timeout = 0;
cmd->flags = 0;
......@@ -299,7 +298,6 @@ static int scsi_init_cmd_errh(struct scsi_cmnd *cmd)
memcpy(cmd->data_cmnd, cmd->cmnd, sizeof(cmd->cmnd));
cmd->buffer = cmd->request_buffer;
cmd->bufflen = cmd->request_bufflen;
cmd->reset_chain = NULL;
cmd->internal_timeout = NORMAL_TIMEOUT;
cmd->abort_reason = 0;
......
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