[PATCH 25 of 33] IB/ipath - On unrecoverable errors, force link dow, LEDs off

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Bryan O'Sullivan
Date: Thursday, March 15, 2007 - 2:45 pm

# HG changeset patch
# User Bryan O'Sullivan <bos@pathscale.com>
# Date 1173994465 25200
# Node ID e9895e2ad504a2590b0943c037d1fa5f9568fda3
# Parent  3e81a6b18b42bbe6dffab382fb26d754dfdf83a1
IB/ipath - On unrecoverable errors, force link dow, LEDs off

If the chip is no longer usable, LEDs should be turned off so system
can be found easily in the cluster.

Also some minor reorganizing so both chips print hardware error message
at same point and only if there were unrecovered errors

Signed-off-by: Dave Olson <dave.olson@qlogic.com>
Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>

diff -r 3e81a6b18b42 -r e9895e2ad504 drivers/infiniband/hw/ipath/ipath_iba6110.c
--- a/drivers/infiniband/hw/ipath/ipath_iba6110.c	Thu Mar 15 14:34:25 2007 -0700
+++ b/drivers/infiniband/hw/ipath/ipath_iba6110.c	Thu Mar 15 14:34:25 2007 -0700
@@ -42,6 +42,9 @@
 
 #include "ipath_kernel.h"
 #include "ipath_registers.h"
+
+static void ipath_setup_ht_setextled(struct ipath_devdata *, u64, u64);
+
 
 /*
  * This lists the InfiniPath registers, in the actual chip layout.
@@ -572,9 +575,14 @@ static void ipath_ht_handle_hwerrors(str
 		 * make the complaint once, in case it's stuck
 		 * or recurring, and we get here multiple
 		 * times.
+		 * force link down, so switch knows, and
+		 * LEDs are turned off
 		 */
-		ipath_dev_err(dd, "%s hardware error\n", msg);
 		if (dd->ipath_flags & IPATH_INITTED) {
+			ipath_set_linkstate(dd, IPATH_IB_LINKDOWN);
+			ipath_setup_ht_setextled(dd, 
+				INFINIPATH_IBCS_L_STATE_DOWN,
+				INFINIPATH_IBCS_LT_STATE_DISABLED);
 			ipath_dev_err(dd, "Fatal Hardware Error (freeze "
 					  "mode), no longer usable, SN %.16s\n",
 					  dd->ipath_serial);
@@ -592,6 +600,8 @@ static void ipath_ht_handle_hwerrors(str
 	}
 	else
 		*msg = 0; /* recovered from all of them */
+	if (*msg)
+		ipath_dev_err(dd, "%s hardware error\n", msg);
 	if (isfatal && !ipath_diag_inuse && dd->ipath_freezemsg)
 		/*
 		 * for status file; if no trailing brace is copied,
diff -r 3e81a6b18b42 -r e9895e2ad504 drivers/infiniband/hw/ipath/ipath_iba6120.c
--- a/drivers/infiniband/hw/ipath/ipath_iba6120.c	Thu Mar 15 14:34:25 2007 -0700
+++ b/drivers/infiniband/hw/ipath/ipath_iba6120.c	Thu Mar 15 14:34:25 2007 -0700
@@ -42,6 +42,8 @@
 
 #include "ipath_kernel.h"
 #include "ipath_registers.h"
+
+static void ipath_setup_pe_setextled(struct ipath_devdata *, u64, u64);
 
 /*
  * This file contains all the chip-specific register information and
@@ -407,8 +409,14 @@ static void ipath_pe_handle_hwerrors(str
 			 * if any set that we aren't ignoring only make the
 			 * complaint once, in case it's stuck or recurring,
 			 * and we get here multiple times
+			 * Force link down, so switch knows, and
+			 * LEDs are turned off
 			 */
 			if (dd->ipath_flags & IPATH_INITTED) {
+				ipath_set_linkstate(dd, IPATH_IB_LINKDOWN);
+				ipath_setup_pe_setextled(dd, 
+					INFINIPATH_IBCS_L_STATE_DOWN,
+					INFINIPATH_IBCS_LT_STATE_DISABLED);
 				ipath_dev_err(dd, "Fatal Hardware Error (freeze "
 					      "mode), no longer usable, SN %.16s\n",
 						  dd->ipath_serial);
@@ -482,7 +490,8 @@ static void ipath_pe_handle_hwerrors(str
 				 dd->ipath_hwerrmask);
 	}
 
-	ipath_dev_err(dd, "%s hardware error\n", msg);
+	if (*msg)
+		ipath_dev_err(dd, "%s hardware error\n", msg);
 	if (isfatal && !ipath_diag_inuse && dd->ipath_freezemsg) {
 		/*
 		 * for /sys status file ; if no trailing } is copied, we'll
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 00 of 33] Set of ipath patches for 2.6.22, Bryan O'Sullivan, (Thu Mar 15, 2:44 pm)
[PATCH 08 of 33] IB/ipath - fix up some debug messages, Bryan O'Sullivan, (Thu Mar 15, 2:44 pm)
[PATCH 09 of 33] IB/ipath - fix QP error completion queue ..., Bryan O'Sullivan, (Thu Mar 15, 2:44 pm)
[PATCH 10 of 33] IB/ipath - fix PSN update for RC retries, Bryan O'Sullivan, (Thu Mar 15, 2:44 pm)
[PATCH 12 of 33] IB/ipath - fix bad argument to clear_bit ..., Bryan O'Sullivan, (Thu Mar 15, 2:44 pm)
[PATCH 14 of 33] IB/ipath - fix port sharing on powerpc, Bryan O'Sullivan, (Thu Mar 15, 2:44 pm)
[PATCH 16 of 33] IB/ipath - fix RDMA reads of length zero ..., Bryan O'Sullivan, (Thu Mar 15, 2:45 pm)
[PATCH 18 of 33] IB/ipath - Fix calculation for number of ..., Bryan O'Sullivan, (Thu Mar 15, 2:45 pm)
[PATCH 21 of 33] IB/ipath - force PIOAvail update entry point, Bryan O'Sullivan, (Thu Mar 15, 2:45 pm)
[PATCH 25 of 33] IB/ipath - On unrecoverable errors, force ..., Bryan O'Sullivan, (Thu Mar 15, 2:45 pm)
[PATCH 26 of 33] IB/ipath - prevent random program use of ..., Bryan O'Sullivan, (Thu Mar 15, 2:45 pm)
[PATCH 29 of 33] IB/ipath - fix unit selection due to all ..., Bryan O'Sullivan, (Thu Mar 15, 2:45 pm)
[PATCH 30 of 33] IB/ipath - check reserved keys, Bryan O'Sullivan, (Thu Mar 15, 2:45 pm)
[PATCH 33 of 33] IB/ipath - fix drift between WCs in user ..., Bryan O'Sullivan, (Thu Mar 15, 2:45 pm)
Re: [PATCH 00 of 33] Set of ipath patches for 2.6.22, Roland Dreier, (Mon Mar 19, 2:17 pm)
Re: [PATCH 01 of 33] IB/ipath - add ability to set and cle ..., Bryan O'Sullivan, (Wed Mar 21, 11:50 am)
Re: [PATCH 00 of 33] Set of ipath patches for 2.6.22, Roland Dreier, (Tue Apr 10, 3:30 pm)