aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ipath/ipath_iba6110.c
diff options
context:
space:
mode:
authorDave Olson <dave.olson@qlogic.com>2008-04-17 00:01:12 -0400
committerRoland Dreier <rolandd@cisco.com>2008-04-17 00:01:12 -0400
commitf2ceb4929ab543e54efaadcad215a105df684f36 (patch)
tree8bbfdfe53c55544080279dec08d9ef8067986097 /drivers/infiniband/hw/ipath/ipath_iba6110.c
parent3dd59e226e01ddb5b041eb0b2e7c7f28b1f730c9 (diff)
IB/ipath: Make some constants chip-specific, related cleanup
This patch makes some constants chip-specific, and makes some related changes to prepare for supporting another HCA. Signed-off-by: Dave Olson <dave.olson@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.c33
1 files changed, 12 insertions, 21 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_iba6110.c b/drivers/infiniband/hw/ipath/ipath_iba6110.c
index 9e2ced3cdc5e..684c27e42406 100644
--- a/drivers/infiniband/hw/ipath/ipath_iba6110.c
+++ b/drivers/infiniband/hw/ipath/ipath_iba6110.c
@@ -40,6 +40,7 @@
40#include <linux/pci.h> 40#include <linux/pci.h>
41#include <linux/delay.h> 41#include <linux/delay.h>
42#include <linux/htirq.h> 42#include <linux/htirq.h>
43#include <rdma/ib_verbs.h>
43 44
44#include "ipath_kernel.h" 45#include "ipath_kernel.h"
45#include "ipath_registers.h" 46#include "ipath_registers.h"
@@ -476,7 +477,13 @@ static const struct ipath_hwerror_msgs ipath_6110_hwerror_msgs[] = {
476#define RXE_EAGER_PARITY (INFINIPATH_HWE_RXEMEMPARITYERR_EAGERTID \ 477#define RXE_EAGER_PARITY (INFINIPATH_HWE_RXEMEMPARITYERR_EAGERTID \
477 << INFINIPATH_HWE_RXEMEMPARITYERR_SHIFT) 478 << INFINIPATH_HWE_RXEMEMPARITYERR_SHIFT)
478 479
479static int ipath_ht_txe_recover(struct ipath_devdata *); 480static void ipath_ht_txe_recover(struct ipath_devdata *dd)
481{
482 ++ipath_stats.sps_txeparity;
483 dev_info(&dd->pcidev->dev,
484 "Recovering from TXE PIO parity error\n");
485}
486
480 487
481/** 488/**
482 * ipath_ht_handle_hwerrors - display hardware errors. 489 * ipath_ht_handle_hwerrors - display hardware errors.
@@ -557,11 +564,11 @@ static void ipath_ht_handle_hwerrors(struct ipath_devdata *dd, char *msg,
557 * occur if a processor speculative read is done to the PIO 564 * occur if a processor speculative read is done to the PIO
558 * buffer while we are sending a packet, for example. 565 * buffer while we are sending a packet, for example.
559 */ 566 */
560 if ((hwerrs & TXE_PIO_PARITY) && ipath_ht_txe_recover(dd)) 567 if (hwerrs & TXE_PIO_PARITY) {
568 ipath_ht_txe_recover(dd);
561 hwerrs &= ~TXE_PIO_PARITY; 569 hwerrs &= ~TXE_PIO_PARITY;
562 if (hwerrs & RXE_EAGER_PARITY) 570 }
563 ipath_dev_err(dd, "RXE parity, Eager TID error is not " 571
564 "recoverable\n");
565 if (!hwerrs) { 572 if (!hwerrs) {
566 ipath_dbg("Clearing freezemode on ignored or " 573 ipath_dbg("Clearing freezemode on ignored or "
567 "recovered hardware error\n"); 574 "recovered hardware error\n");
@@ -1653,22 +1660,6 @@ static int ipath_ht_early_init(struct ipath_devdata *dd)
1653} 1660}
1654 1661
1655 1662
1656static int ipath_ht_txe_recover(struct ipath_devdata *dd)
1657{
1658 int cnt = ++ipath_stats.sps_txeparity;
1659 if (cnt >= IPATH_MAX_PARITY_ATTEMPTS) {
1660 if (cnt == IPATH_MAX_PARITY_ATTEMPTS)
1661 ipath_dev_err(dd,
1662 "Too many attempts to recover from "
1663 "TXE parity, giving up\n");
1664 return 0;
1665 }
1666 dev_info(&dd->pcidev->dev,
1667 "Recovering from TXE PIO parity error\n");
1668 return 1;
1669}
1670
1671
1672/** 1663/**
1673 * ipath_init_ht_get_base_info - set chip-specific flags for user code 1664 * ipath_init_ht_get_base_info - set chip-specific flags for user code
1674 * @dd: the infinipath device 1665 * @dd: the infinipath device