From: Sumant Patro <sumantp@lsil.com>
To: James.Bottomley@SteelEye.com, akpm@osdl.org, linux-scsi@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, neela.kolli@lsi.com,
bo.yang@lsi.com, sumant.patro@lsi.com
Subject: [PATCH 1/5] scsi: megaraid_sas - stop cmd processing if hw_crit_error is set
Date: Tue, 06 Feb 2007 13:49:24 -0800 [thread overview]
Message-ID: <1170798564.10482.12.camel@dumbo> (raw)
[-- Attachment #1: Type: text/plain, Size: 1580 bytes --]
Checks if hw_crit_error is set before processing cmds.
Added in megasas_queue_command and command completion routines.
Signed-off-by: Sumant Patro <sumant.patro@lsi.com>
---
drivers/scsi/megaraid/megaraid_sas.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletion(-)
diff -uprN 2.6.orig/drivers/scsi/megaraid/megaraid_sas.c 2.6.new-p1/drivers/scsi/megaraid/megaraid_sas.c
--- 2.6.orig/drivers/scsi/megaraid/megaraid_sas.c 2007-02-05 09:51:01.000000000 -0800
+++ 2.6.new-p1/drivers/scsi/megaraid/megaraid_sas.c 2007-02-06 06:54:07.000000000 -0800
@@ -841,6 +841,11 @@ megasas_queue_command(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 megas
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(uns
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;
[-- Attachment #2: Type: text/x-patch, Size: 1294 bytes --]
diff -uprN 2.6.orig/drivers/scsi/megaraid/megaraid_sas.c 2.6.new-p1/drivers/scsi/megaraid/megaraid_sas.c
--- 2.6.orig/drivers/scsi/megaraid/megaraid_sas.c 2007-02-05 09:51:01.000000000 -0800
+++ 2.6.new-p1/drivers/scsi/megaraid/megaraid_sas.c 2007-02-06 06:54:07.000000000 -0800
@@ -841,6 +841,11 @@ megasas_queue_command(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 megas
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(uns
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;
next reply other threads:[~2007-02-07 2:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-06 21:49 Sumant Patro [this message]
2007-02-07 21:17 ` [PATCH 1/5] scsi: megaraid_sas - stop cmd processing if hw_crit_error is set Andrew Morton
-- strict thread matches above, loose matches on Subject: below --
2007-02-08 2:59 Patro, Sumant
2007-02-08 2:59 ` Patro, Sumant
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1170798564.10482.12.camel@dumbo \
--to=sumantp@lsil.com \
--cc=James.Bottomley@SteelEye.com \
--cc=akpm@osdl.org \
--cc=bo.yang@lsi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=neela.kolli@lsi.com \
--cc=sumant.patro@lsi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.