diff options
author | Michael Albaugh <michael.albaugh@qlogic.com> | 2007-05-17 10:26:28 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2007-07-09 23:12:25 -0400 |
commit | aecd3b5ab19624ca9644b9df9c61615282d8923f (patch) | |
tree | d4f4b5367a40bd737899b7e3dbfcfab6021891e0 /drivers/infiniband/hw/ipath/ipath_iba6110.c | |
parent | 8e9ab3f1c9e34d5c28446c3738983d33a3937fe0 (diff) |
IB/ipath: Log "active" time and some errors to EEPROM
We currently track various errors, now we enhance that capability by
logging some of them to EEPROM. We also now log a cumulative "active"
time defined by traffic though the InfiniPath HCA beyond the normal SM
traffic.
Signed-off-by: Michael Albaugh <michael.albaugh@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_iba6110.c')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_iba6110.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_iba6110.c b/drivers/infiniband/hw/ipath/ipath_iba6110.c index 8482ea366fb1..85f408de7bf7 100644 --- a/drivers/infiniband/hw/ipath/ipath_iba6110.c +++ b/drivers/infiniband/hw/ipath/ipath_iba6110.c | |||
@@ -440,6 +440,7 @@ static void ipath_ht_handle_hwerrors(struct ipath_devdata *dd, char *msg, | |||
440 | u32 bits, ctrl; | 440 | u32 bits, ctrl; |
441 | int isfatal = 0; | 441 | int isfatal = 0; |
442 | char bitsmsg[64]; | 442 | char bitsmsg[64]; |
443 | int log_idx; | ||
443 | 444 | ||
444 | hwerrs = ipath_read_kreg64(dd, dd->ipath_kregs->kr_hwerrstatus); | 445 | hwerrs = ipath_read_kreg64(dd, dd->ipath_kregs->kr_hwerrstatus); |
445 | 446 | ||
@@ -468,6 +469,11 @@ static void ipath_ht_handle_hwerrors(struct ipath_devdata *dd, char *msg, | |||
468 | 469 | ||
469 | hwerrs &= dd->ipath_hwerrmask; | 470 | hwerrs &= dd->ipath_hwerrmask; |
470 | 471 | ||
472 | /* We log some errors to EEPROM, check if we have any of those. */ | ||
473 | for (log_idx = 0; log_idx < IPATH_EEP_LOG_CNT; ++log_idx) | ||
474 | if (hwerrs & dd->ipath_eep_st_masks[log_idx].hwerrs_to_log) | ||
475 | ipath_inc_eeprom_err(dd, log_idx, 1); | ||
476 | |||
471 | /* | 477 | /* |
472 | * make sure we get this much out, unless told to be quiet, | 478 | * make sure we get this much out, unless told to be quiet, |
473 | * it's a parity error we may recover from, | 479 | * it's a parity error we may recover from, |
@@ -1171,6 +1177,22 @@ static void ipath_init_ht_variables(struct ipath_devdata *dd) | |||
1171 | 1177 | ||
1172 | dd->ipath_i_rcvavail_mask = INFINIPATH_I_RCVAVAIL_MASK; | 1178 | dd->ipath_i_rcvavail_mask = INFINIPATH_I_RCVAVAIL_MASK; |
1173 | dd->ipath_i_rcvurg_mask = INFINIPATH_I_RCVURG_MASK; | 1179 | dd->ipath_i_rcvurg_mask = INFINIPATH_I_RCVURG_MASK; |
1180 | |||
1181 | /* | ||
1182 | * EEPROM error log 0 is TXE Parity errors. 1 is RXE Parity. | ||
1183 | * 2 is Some Misc, 3 is reserved for future. | ||
1184 | */ | ||
1185 | dd->ipath_eep_st_masks[0].hwerrs_to_log = | ||
1186 | INFINIPATH_HWE_TXEMEMPARITYERR_MASK << | ||
1187 | INFINIPATH_HWE_TXEMEMPARITYERR_SHIFT; | ||
1188 | |||
1189 | dd->ipath_eep_st_masks[1].hwerrs_to_log = | ||
1190 | INFINIPATH_HWE_RXEMEMPARITYERR_MASK << | ||
1191 | INFINIPATH_HWE_RXEMEMPARITYERR_SHIFT; | ||
1192 | |||
1193 | dd->ipath_eep_st_masks[2].errs_to_log = | ||
1194 | INFINIPATH_E_INVALIDADDR | INFINIPATH_E_RESET; | ||
1195 | |||
1174 | } | 1196 | } |
1175 | 1197 | ||
1176 | /** | 1198 | /** |