aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/megaraid/megaraid_sas.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas.c b/drivers/scsi/megaraid/megaraid_sas.c
index 15e24fcc84f3..6ff540140807 100644
--- a/drivers/scsi/megaraid/megaraid_sas.c
+++ b/drivers/scsi/megaraid/megaraid_sas.c
@@ -841,6 +841,11 @@ megasas_queue_command(struct scsi_cmnd *scmd, void (*done) (struct scsi_cmnd *))
841 841
842 instance = (struct megasas_instance *) 842 instance = (struct megasas_instance *)
843 scmd->device->host->hostdata; 843 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
844 scmd->scsi_done = done; 849 scmd->scsi_done = done;
845 scmd->result = 0; 850 scmd->result = 0;
846 851
@@ -1282,11 +1287,13 @@ megasas_deplete_reply_queue(struct megasas_instance *instance, u8 alt_status)
1282 if(instance->instancet->clear_intr(instance->reg_set)) 1287 if(instance->instancet->clear_intr(instance->reg_set))
1283 return IRQ_NONE; 1288 return IRQ_NONE;
1284 1289
1290 if (instance->hw_crit_error)
1291 goto out_done;
1285 /* 1292 /*
1286 * Schedule the tasklet for cmd completion 1293 * Schedule the tasklet for cmd completion
1287 */ 1294 */
1288 tasklet_schedule(&instance->isr_tasklet); 1295 tasklet_schedule(&instance->isr_tasklet);
1289 1296out_done:
1290 return IRQ_HANDLED; 1297 return IRQ_HANDLED;
1291} 1298}
1292 1299
@@ -1741,6 +1748,10 @@ static void megasas_complete_cmd_dpc(unsigned long instance_addr)
1741 struct megasas_cmd *cmd; 1748 struct megasas_cmd *cmd;
1742 struct megasas_instance *instance = (struct megasas_instance *)instance_addr; 1749 struct megasas_instance *instance = (struct megasas_instance *)instance_addr;
1743 1750
1751 /* If we have already declared adapter dead, donot complete cmds */
1752 if (instance->hw_crit_error)
1753 return;
1754
1744 producer = *instance->producer; 1755 producer = *instance->producer;
1745 consumer = *instance->consumer; 1756 consumer = *instance->consumer;
1746 1757