Commit af37acfb authored by Sumant Patro's avatar Sumant Patro Committed by James Bottomley

[SCSI] megaraid_sas: do not process cmds if hw_crit_error is set

Checks if hw_crit_error is set.
If it is set, we donot process commands.
Checks added in megasas_queue_command and command completion routines.
Signed-off-by: default avatarSumant Patro <sumant.patro@lsi.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent a9b73202
...@@ -841,6 +841,11 @@ megasas_queue_command(struct scsi_cmnd *scmd, void (*done) (struct scsi_cmnd *)) ...@@ -841,6 +841,11 @@ megasas_queue_command(struct scsi_cmnd *scmd, void (*done) (struct scsi_cmnd *))
instance = (struct megasas_instance *) instance = (struct megasas_instance *)
scmd->device->host->hostdata; scmd->device->host->hostdata;
/* Don't process if we have already declared adapter dead */
if (instance->hw_crit_error)
return SCSI_MLQUEUE_HOST_BUSY;
scmd->scsi_done = done; scmd->scsi_done = done;
scmd->result = 0; scmd->result = 0;
...@@ -1282,11 +1287,13 @@ megasas_deplete_reply_queue(struct megasas_instance *instance, u8 alt_status) ...@@ -1282,11 +1287,13 @@ megasas_deplete_reply_queue(struct megasas_instance *instance, u8 alt_status)
if(instance->instancet->clear_intr(instance->reg_set)) if(instance->instancet->clear_intr(instance->reg_set))
return IRQ_NONE; return IRQ_NONE;
if (instance->hw_crit_error)
goto out_done;
/* /*
* Schedule the tasklet for cmd completion * Schedule the tasklet for cmd completion
*/ */
tasklet_schedule(&instance->isr_tasklet); tasklet_schedule(&instance->isr_tasklet);
out_done:
return IRQ_HANDLED; return IRQ_HANDLED;
} }
...@@ -1741,6 +1748,10 @@ static void megasas_complete_cmd_dpc(unsigned long instance_addr) ...@@ -1741,6 +1748,10 @@ static void megasas_complete_cmd_dpc(unsigned long instance_addr)
struct megasas_cmd *cmd; struct megasas_cmd *cmd;
struct megasas_instance *instance = (struct megasas_instance *)instance_addr; struct megasas_instance *instance = (struct megasas_instance *)instance_addr;
/* If we have already declared adapter dead, donot complete cmds */
if (instance->hw_crit_error)
return;
producer = *instance->producer; producer = *instance->producer;
consumer = *instance->consumer; consumer = *instance->consumer;
......
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