aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorSumant Patro <sumantp@lsil.com>2007-02-14 15:34:46 -0500
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-02-16 11:15:29 -0500
commitaf37acfb63d8e924550e67b884dbd1c478e26c96 (patch)
tree2b3230cf515361b9aef1c43ae22df4e131530ef3 /drivers/scsi
parenta9b7320294f885be6087bdef7a0e25922c36eb1b (diff)
[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>
Diffstat (limited to 'drivers/scsi')
-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