]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[SCSI] megaraid_sas: do not process cmds if hw_crit_error is set
authorSumant Patro <sumantp@lsil.com>
Wed, 14 Feb 2007 20:34:46 +0000 (12:34 -0800)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Fri, 16 Feb 2007 16:15:29 +0000 (10:15 -0600)
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>
drivers/scsi/megaraid/megaraid_sas.c

index 15e24fcc84f3b871f9f69c0621419ea91d61e60c..6ff5401408073b64bc7d1e0e7042b03d7ec6d5c0 100644 (file)
@@ -841,6 +841,11 @@ megasas_queue_command(struct scsi_cmnd *scmd, void (*done) (struct scsi_cmnd *))
 
        instance = (struct megasas_instance *)
            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->result = 0;
 
@@ -1282,11 +1287,13 @@ megasas_deplete_reply_queue(struct megasas_instance *instance, u8 alt_status)
        if(instance->instancet->clear_intr(instance->reg_set))
                return IRQ_NONE;
 
+       if (instance->hw_crit_error)
+               goto out_done;
         /*
         * Schedule the tasklet for cmd completion
         */
        tasklet_schedule(&instance->isr_tasklet);
-
+out_done:
        return IRQ_HANDLED;
 }
 
@@ -1741,6 +1748,10 @@ static void megasas_complete_cmd_dpc(unsigned long instance_addr)
        struct megasas_cmd *cmd;
        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;
        consumer = *instance->consumer;