Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=af37acfb63d8e924550e67b884dbd1c478e26c96
Commit:     af37acfb63d8e924550e67b884dbd1c478e26c96
Parent:     a9b7320294f885be6087bdef7a0e25922c36eb1b
Author:     Sumant Patro <[EMAIL PROTECTED]>
AuthorDate: Wed Feb 14 12:34:46 2007 -0800
Committer:  James Bottomley <[EMAIL PROTECTED]>
CommitDate: Fri Feb 16 10:15:29 2007 -0600

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: James Bottomley <[EMAIL PROTECTED]>
---
 drivers/scsi/megaraid/megaraid_sas.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas.c 
b/drivers/scsi/megaraid/megaraid_sas.c
index 15e24fc..6ff5401 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 *))
 
        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;
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to