Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f5408ac7ccec0a7edd2b6add0da82735375a37a0
Commit:     f5408ac7ccec0a7edd2b6add0da82735375a37a0
Parent:     27b044a815df7d4530bc68560796680ed588070c
Author:     Bryan O'Sullivan <[EMAIL PROTECTED]>
AuthorDate: Thu Mar 15 14:45:09 2007 -0700
Committer:  Roland Dreier <[EMAIL PROTECTED]>
CommitDate: Wed Apr 18 20:20:59 2007 -0700

    IB/ipath: On unrecoverable errors, force link down, 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 <[EMAIL PROTECTED]>
    Signed-off-by: Bryan O'Sullivan <[EMAIL PROTECTED]>
    Signed-off-by: Roland Dreier <[EMAIL PROTECTED]>
---
 drivers/infiniband/hw/ipath/ipath_iba6110.c |   12 +++++++++++-
 drivers/infiniband/hw/ipath/ipath_iba6120.c |   11 ++++++++++-
 2 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/hw/ipath/ipath_iba6110.c 
b/drivers/infiniband/hw/ipath/ipath_iba6110.c
index 8e0794d..4171198 100644
--- a/drivers/infiniband/hw/ipath/ipath_iba6110.c
+++ b/drivers/infiniband/hw/ipath/ipath_iba6110.c
@@ -43,6 +43,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.
  * This structure should never be directly accessed.
@@ -572,9 +575,14 @@ static void ipath_ht_handle_hwerrors(struct ipath_devdata 
*dd, char *msg,
                 * 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(struct ipath_devdata 
*dd, char *msg,
        }
        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 --git a/drivers/infiniband/hw/ipath/ipath_iba6120.c 
b/drivers/infiniband/hw/ipath/ipath_iba6120.c
index aa2b519..1b9c308 100644
--- a/drivers/infiniband/hw/ipath/ipath_iba6120.c
+++ b/drivers/infiniband/hw/ipath/ipath_iba6120.c
@@ -43,6 +43,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
  * access functions for the QLogic InfiniPath PCI-Express chip.
@@ -407,8 +409,14 @@ static void ipath_pe_handle_hwerrors(struct ipath_devdata 
*dd, char *msg,
                         * 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(struct ipath_devdata 
*dd, char *msg,
                                 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
-
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