RE: [PATCH 1/5] scsi: megaraid_sas - stop cmd processing if hw_crit_error is set

2007-02-07 Thread Patro, Sumant
I will correct the formatting and will resubmit.

Regards,
Sumant 

-Original Message-
From: Andrew Morton [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 07, 2007 1:18 PM
To: Patro, Sumant
Cc: [EMAIL PROTECTED]; linux-scsi@vger.kernel.org;
linux-kernel@vger.kernel.org; Kolli, Neela; Yang, Bo; Patro, Sumant
Subject: Re: [PATCH 1/5] scsi: megaraid_sas - stop cmd processing if
hw_crit_error is set

On Tue, 06 Feb 2007 13:49:24 -0800
Sumant Patro <[EMAIL PROTECTED]> wrote:

> + /* Don't process if we have already declared adapter dead */
> + if(instance->hw_crit_error)

Preferred kernel coding style is "if (".

> [p1-crit_err.patch  text/x-patch (1.3KB)]

argh.  Please don't send two copies of the patch in the email.  Because
the result applies happily with `patch --dry-run' and then creates a
great mess when you try to apply the patch for real.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 1/5] scsi: megaraid_sas - stop cmd processing if hw_crit_error is set

2007-02-07 Thread Andrew Morton
On Tue, 06 Feb 2007 13:49:24 -0800
Sumant Patro <[EMAIL PROTECTED]> wrote:

> + /* Don't process if we have already declared adapter dead */
> + if(instance->hw_crit_error)

Preferred kernel coding style is "if (".

> [p1-crit_err.patch  text/x-patch (1.3KB)]

argh.  Please don't send two copies of the patch in the email.  Because the
result applies happily with `patch --dry-run' and then creates a great mess
when you try to apply the patch for real.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 1/5] scsi: megaraid_sas - stop cmd processing if hw_crit_error is set

2007-02-07 Thread Andrew Morton
On Tue, 06 Feb 2007 13:49:24 -0800
Sumant Patro [EMAIL PROTECTED] wrote:

 + /* Don't process if we have already declared adapter dead */
 + if(instance-hw_crit_error)

Preferred kernel coding style is if (.

 [p1-crit_err.patch  text/x-patch (1.3KB)]

argh.  Please don't send two copies of the patch in the email.  Because the
result applies happily with `patch --dry-run' and then creates a great mess
when you try to apply the patch for real.

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH 1/5] scsi: megaraid_sas - stop cmd processing if hw_crit_error is set

2007-02-07 Thread Patro, Sumant
I will correct the formatting and will resubmit.

Regards,
Sumant 

-Original Message-
From: Andrew Morton [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 07, 2007 1:18 PM
To: Patro, Sumant
Cc: [EMAIL PROTECTED]; linux-scsi@vger.kernel.org;
linux-kernel@vger.kernel.org; Kolli, Neela; Yang, Bo; Patro, Sumant
Subject: Re: [PATCH 1/5] scsi: megaraid_sas - stop cmd processing if
hw_crit_error is set

On Tue, 06 Feb 2007 13:49:24 -0800
Sumant Patro [EMAIL PROTECTED] wrote:

 + /* Don't process if we have already declared adapter dead */
 + if(instance-hw_crit_error)

Preferred kernel coding style is if (.

 [p1-crit_err.patch  text/x-patch (1.3KB)]

argh.  Please don't send two copies of the patch in the email.  Because
the result applies happily with `patch --dry-run' and then creates a
great mess when you try to apply the patch for real.

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/5] scsi: megaraid_sas - stop cmd processing if hw_crit_error is set

2007-02-06 Thread Sumant Patro
Checks if hw_crit_error is set before processing cmds.
Added in megasas_queue_command and command completion routines.

Signed-off-by: Sumant Patro <[EMAIL PROTECTED]>
---
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.0 -0800
+++ 2.6.new-p1/drivers/scsi/megaraid/megaraid_sas.c 2007-02-06 
06:54:07.0 -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(>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;
 


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.0 -0800
+++ 2.6.new-p1/drivers/scsi/megaraid/megaraid_sas.c	2007-02-06 06:54:07.0 -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(>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;
 


[PATCH 1/5] scsi: megaraid_sas - stop cmd processing if hw_crit_error is set

2007-02-06 Thread Sumant Patro
Checks if hw_crit_error is set before processing cmds.
Added in megasas_queue_command and command completion routines.

Signed-off-by: Sumant Patro [EMAIL PROTECTED]
---
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.0 -0800
+++ 2.6.new-p1/drivers/scsi/megaraid/megaraid_sas.c 2007-02-06 
06:54:07.0 -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;
 


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.0 -0800
+++ 2.6.new-p1/drivers/scsi/megaraid/megaraid_sas.c	2007-02-06 06:54:07.0 -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;