Skip to content

Commit af37acf

Browse files
Sumant PatroJames Bottomley
authored andcommitted
[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: Sumant Patro <sumant.patro@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
1 parent a9b7320 commit af37acf

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

drivers/scsi/megaraid/megaraid_sas.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -841,6 +841,11 @@ megasas_queue_command(struct scsi_cmnd *scmd, void (*done) (struct scsi_cmnd *))
841841

842842
instance = (struct megasas_instance *)
843843
scmd->device->host->hostdata;
844+
845+
/* Don't process if we have already declared adapter dead */
846+
if (instance->hw_crit_error)
847+
return SCSI_MLQUEUE_HOST_BUSY;
848+
844849
scmd->scsi_done = done;
845850
scmd->result = 0;
846851

@@ -1282,11 +1287,13 @@ megasas_deplete_reply_queue(struct megasas_instance *instance, u8 alt_status)
12821287
if(instance->instancet->clear_intr(instance->reg_set))
12831288
return IRQ_NONE;
12841289

1290+
if (instance->hw_crit_error)
1291+
goto out_done;
12851292
/*
12861293
* Schedule the tasklet for cmd completion
12871294
*/
12881295
tasklet_schedule(&instance->isr_tasklet);
1289-
1296+
out_done:
12901297
return IRQ_HANDLED;
12911298
}
12921299

@@ -1741,6 +1748,10 @@ static void megasas_complete_cmd_dpc(unsigned long instance_addr)
17411748
struct megasas_cmd *cmd;
17421749
struct megasas_instance *instance = (struct megasas_instance *)instance_addr;
17431750

1751+
/* If we have already declared adapter dead, donot complete cmds */
1752+
if (instance->hw_crit_error)
1753+
return;
1754+
17441755
producer = *instance->producer;
17451756
consumer = *instance->consumer;
17461757

0 commit comments

Comments
 (0)