diff options
author | Bryan O'Sullivan <bos@pathscale.com> | 2007-03-15 17:45:09 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2007-04-18 23:20:59 -0400 |
commit | f5408ac7ccec0a7edd2b6add0da82735375a37a0 (patch) | |
tree | c70b373cdbfe2267a8ca81e86d954dff7bd833ec /drivers | |
parent | 27b044a815df7d4530bc68560796680ed588070c (diff) |
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 <dave.olson@qlogic.com>
Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_iba6110.c | 12 | ||||
-rw-r--r-- | 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 8e0794d316fb..4171198fc202 100644 --- a/drivers/infiniband/hw/ipath/ipath_iba6110.c +++ b/drivers/infiniband/hw/ipath/ipath_iba6110.c | |||
@@ -43,6 +43,9 @@ | |||
43 | #include "ipath_kernel.h" | 43 | #include "ipath_kernel.h" |
44 | #include "ipath_registers.h" | 44 | #include "ipath_registers.h" |
45 | 45 | ||
46 | static void ipath_setup_ht_setextled(struct ipath_devdata *, u64, u64); | ||
47 | |||
48 | |||
46 | /* | 49 | /* |
47 | * This lists the InfiniPath registers, in the actual chip layout. | 50 | * This lists the InfiniPath registers, in the actual chip layout. |
48 | * This structure should never be directly accessed. | 51 | * This structure should never be directly accessed. |
@@ -572,9 +575,14 @@ static void ipath_ht_handle_hwerrors(struct ipath_devdata *dd, char *msg, | |||
572 | * make the complaint once, in case it's stuck | 575 | * make the complaint once, in case it's stuck |
573 | * or recurring, and we get here multiple | 576 | * or recurring, and we get here multiple |
574 | * times. | 577 | * times. |
578 | * force link down, so switch knows, and | ||
579 | * LEDs are turned off | ||
575 | */ | 580 | */ |
576 | ipath_dev_err(dd, "%s hardware error\n", msg); | ||
577 | if (dd->ipath_flags & IPATH_INITTED) { | 581 | if (dd->ipath_flags & IPATH_INITTED) { |
582 | ipath_set_linkstate(dd, IPATH_IB_LINKDOWN); | ||
583 | ipath_setup_ht_setextled(dd, | ||
584 | INFINIPATH_IBCS_L_STATE_DOWN, | ||
585 | INFINIPATH_IBCS_LT_STATE_DISABLED); | ||
578 | ipath_dev_err(dd, "Fatal Hardware Error (freeze " | 586 | ipath_dev_err(dd, "Fatal Hardware Error (freeze " |
579 | "mode), no longer usable, SN %.16s\n", | 587 | "mode), no longer usable, SN %.16s\n", |
580 | dd->ipath_serial); | 588 | dd->ipath_serial); |
@@ -592,6 +600,8 @@ static void ipath_ht_handle_hwerrors(struct ipath_devdata *dd, char *msg, | |||
592 | } | 600 | } |
593 | else | 601 | else |
594 | *msg = 0; /* recovered from all of them */ | 602 | *msg = 0; /* recovered from all of them */ |
603 | if (*msg) | ||
604 | ipath_dev_err(dd, "%s hardware error\n", msg); | ||
595 | if (isfatal && !ipath_diag_inuse && dd->ipath_freezemsg) | 605 | if (isfatal && !ipath_diag_inuse && dd->ipath_freezemsg) |
596 | /* | 606 | /* |
597 | * for status file; if no trailing brace is copied, | 607 | * 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 aa2b51944331..1b9c30857754 100644 --- a/drivers/infiniband/hw/ipath/ipath_iba6120.c +++ b/drivers/infiniband/hw/ipath/ipath_iba6120.c | |||
@@ -43,6 +43,8 @@ | |||
43 | #include "ipath_kernel.h" | 43 | #include "ipath_kernel.h" |
44 | #include "ipath_registers.h" | 44 | #include "ipath_registers.h" |
45 | 45 | ||
46 | static void ipath_setup_pe_setextled(struct ipath_devdata *, u64, u64); | ||
47 | |||
46 | /* | 48 | /* |
47 | * This file contains all the chip-specific register information and | 49 | * This file contains all the chip-specific register information and |
48 | * access functions for the QLogic InfiniPath PCI-Express chip. | 50 | * 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, | |||
407 | * if any set that we aren't ignoring only make the | 409 | * if any set that we aren't ignoring only make the |
408 | * complaint once, in case it's stuck or recurring, | 410 | * complaint once, in case it's stuck or recurring, |
409 | * and we get here multiple times | 411 | * and we get here multiple times |
412 | * Force link down, so switch knows, and | ||
413 | * LEDs are turned off | ||
410 | */ | 414 | */ |
411 | if (dd->ipath_flags & IPATH_INITTED) { | 415 | if (dd->ipath_flags & IPATH_INITTED) { |
416 | ipath_set_linkstate(dd, IPATH_IB_LINKDOWN); | ||
417 | ipath_setup_pe_setextled(dd, | ||
418 | INFINIPATH_IBCS_L_STATE_DOWN, | ||
419 | INFINIPATH_IBCS_LT_STATE_DISABLED); | ||
412 | ipath_dev_err(dd, "Fatal Hardware Error (freeze " | 420 | ipath_dev_err(dd, "Fatal Hardware Error (freeze " |
413 | "mode), no longer usable, SN %.16s\n", | 421 | "mode), no longer usable, SN %.16s\n", |
414 | dd->ipath_serial); | 422 | dd->ipath_serial); |
@@ -482,7 +490,8 @@ static void ipath_pe_handle_hwerrors(struct ipath_devdata *dd, char *msg, | |||
482 | dd->ipath_hwerrmask); | 490 | dd->ipath_hwerrmask); |
483 | } | 491 | } |
484 | 492 | ||
485 | ipath_dev_err(dd, "%s hardware error\n", msg); | 493 | if (*msg) |
494 | ipath_dev_err(dd, "%s hardware error\n", msg); | ||
486 | if (isfatal && !ipath_diag_inuse && dd->ipath_freezemsg) { | 495 | if (isfatal && !ipath_diag_inuse && dd->ipath_freezemsg) { |
487 | /* | 496 | /* |
488 | * for /sys status file ; if no trailing } is copied, we'll | 497 | * for /sys status file ; if no trailing } is copied, we'll |