]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/infiniband/hw/ipath/ipath_iba6110.c
IB/ipath: Provide I/O bus speeds for diagnostic purposes
[linux-2.6-omap-h63xx.git] / drivers / infiniband / hw / ipath / ipath_iba6110.c
index 9e2ced3cdc5e656af160b48cd5b53ba8753f19c6..19e3955304c0a79ad5531fa9cbfae5fe17c73891 100644 (file)
@@ -40,6 +40,7 @@
 #include <linux/pci.h>
 #include <linux/delay.h>
 #include <linux/htirq.h>
+#include <rdma/ib_verbs.h>
 
 #include "ipath_kernel.h"
 #include "ipath_registers.h"
@@ -476,7 +477,13 @@ static const struct ipath_hwerror_msgs ipath_6110_hwerror_msgs[] = {
 #define RXE_EAGER_PARITY (INFINIPATH_HWE_RXEMEMPARITYERR_EAGERTID \
                          << INFINIPATH_HWE_RXEMEMPARITYERR_SHIFT)
 
-static int ipath_ht_txe_recover(struct ipath_devdata *);
+static void ipath_ht_txe_recover(struct ipath_devdata *dd)
+{
+       ++ipath_stats.sps_txeparity;
+       dev_info(&dd->pcidev->dev,
+               "Recovering from TXE PIO parity error\n");
+}
+
 
 /**
  * ipath_ht_handle_hwerrors - display hardware errors.
@@ -557,11 +564,11 @@ static void ipath_ht_handle_hwerrors(struct ipath_devdata *dd, char *msg,
                 * occur if a processor speculative read is done to the PIO
                 * buffer while we are sending a packet, for example.
                 */
-               if ((hwerrs & TXE_PIO_PARITY) && ipath_ht_txe_recover(dd))
+               if (hwerrs & TXE_PIO_PARITY) {
+                       ipath_ht_txe_recover(dd);
                        hwerrs &= ~TXE_PIO_PARITY;
-               if (hwerrs & RXE_EAGER_PARITY)
-                       ipath_dev_err(dd, "RXE parity, Eager TID error is not "
-                               "recoverable\n");
+               }
+
                if (!hwerrs) {
                        ipath_dbg("Clearing freezemode on ignored or "
                                  "recovered hardware error\n");
@@ -735,11 +742,10 @@ static int ipath_ht_boardname(struct ipath_devdata *dd, char *name,
         */
        dd->ipath_flags |= IPATH_32BITCOUNTERS;
        dd->ipath_flags |= IPATH_GPIO_INTR;
-       if (dd->ipath_htspeed != 800)
+       if (dd->ipath_lbus_speed != 800)
                ipath_dev_err(dd,
                              "Incorrectly configured for HT @ %uMHz\n",
-                             dd->ipath_htspeed);
-       ret = 0;
+                             dd->ipath_lbus_speed);
 
        /*
         * set here, not in ipath_init_*_funcs because we have to do
@@ -904,7 +910,7 @@ static void slave_or_pri_blk(struct ipath_devdata *dd, struct pci_dev *pdev,
                        break;
                }
 
-               dd->ipath_htwidth = width;
+               dd->ipath_lbus_width = width;
 
                if (linkwidth != 0x11) {
                        ipath_dev_err(dd, "Not configured for 16 bit HT "
@@ -952,8 +958,13 @@ static void slave_or_pri_blk(struct ipath_devdata *dd, struct pci_dev *pdev,
                        speed = 200;
                        break;
                }
-               dd->ipath_htspeed = speed;
+               dd->ipath_lbus_speed = speed;
        }
+
+       snprintf(dd->ipath_lbus_info, sizeof(dd->ipath_lbus_info),
+               "HyperTransport,%uMHz,x%u\n",
+               dd->ipath_lbus_speed,
+               dd->ipath_lbus_width);
 }
 
 static int ipath_ht_intconfig(struct ipath_devdata *dd)
@@ -1653,22 +1664,6 @@ static int ipath_ht_early_init(struct ipath_devdata *dd)
 }
 
 
-static int ipath_ht_txe_recover(struct ipath_devdata *dd)
-{
-       int cnt = ++ipath_stats.sps_txeparity;
-       if (cnt >= IPATH_MAX_PARITY_ATTEMPTS)  {
-               if (cnt == IPATH_MAX_PARITY_ATTEMPTS)
-                       ipath_dev_err(dd,
-                               "Too many attempts to recover from "
-                               "TXE parity, giving up\n");
-               return 0;
-       }
-       dev_info(&dd->pcidev->dev,
-               "Recovering from TXE PIO parity error\n");
-       return 1;
-}
-
-
 /**
  * ipath_init_ht_get_base_info - set chip-specific flags for user code
  * @dd: the infinipath device