]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
IB/ipath: Minor cleanup of unused fields and chip-specific errors
authorDave Olson <dave.olson@qlogic.com>
Tue, 8 Jan 2008 09:51:46 +0000 (01:51 -0800)
committerRoland Dreier <rolandd@cisco.com>
Fri, 25 Jan 2008 22:17:43 +0000 (14:17 -0800)
Clean up some unused header fields, minor related cleanup.

Signed-off-by: Dave Olson <dave.olson@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/ipath/ipath_iba6120.c
drivers/infiniband/hw/ipath/ipath_kernel.h

index 597192e912de414b77e53811d5d1a8cc72ae1abd..c7a2f50824c08357be3620725077e83035bde4c0 100644 (file)
@@ -373,10 +373,28 @@ static const struct ipath_hwerror_msgs ipath_6120_hwerror_msgs[] = {
                        INFINIPATH_HWE_TXEMEMPARITYERR_PIOPBC) \
                        << INFINIPATH_HWE_TXEMEMPARITYERR_SHIFT)
 
-static int ipath_pe_txe_recover(struct ipath_devdata *);
 static void ipath_pe_put_tid_2(struct ipath_devdata *, u64 __iomem *,
                               u32, unsigned long);
 
+/*
+ * On platforms using this chip, and not having ordered WC stores, we
+ * can get TXE parity errors due to speculative reads to the PIO buffers,
+ * and this, due to a chip bug can result in (many) false parity error
+ * reports.  So it's a debug print on those, and an info print on systems
+ * where the speculative reads don't occur.
+ */
+static void ipath_pe_txe_recover(struct ipath_devdata *dd)
+{
+       if (ipath_unordered_wc())
+               ipath_dbg("Recovering from TXE PIO parity error\n");
+       else {
+               ++ipath_stats.sps_txeparity;
+               dev_info(&dd->pcidev->dev,
+                       "Recovering from TXE PIO parity error\n");
+       }
+}
+
+
 /**
  * ipath_pe_handle_hwerrors - display hardware errors.
  * @dd: the infinipath device
@@ -456,35 +474,11 @@ static void ipath_pe_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_pe_txe_recover(dd))
+               if (hwerrs & TXE_PIO_PARITY) {
+                       ipath_pe_txe_recover(dd);
                        hwerrs &= ~TXE_PIO_PARITY;
-               if (hwerrs) {
-                       /*
-                        * 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);
-                               isfatal = 1;
-                       }
-                       /*
-                        * Mark as having had an error for driver, and also
-                        * for /sys and status word mapped to user programs.
-                        * This marks unit as not usable, until reset
-                        */
-                       *dd->ipath_statusp &= ~IPATH_STATUS_IB_READY;
-                       *dd->ipath_statusp |= IPATH_STATUS_HWERROR;
-                       dd->ipath_flags &= ~IPATH_INITTED;
-               } else {
+               }
+               if (!hwerrs) {
                        static u32 freeze_cnt;
 
                        freeze_cnt++;
@@ -1569,33 +1563,6 @@ static void ipath_pe_read_counters(struct ipath_devdata *dd,
        cntrs->RxDlidFltrCnt = 0;
 }
 
-/*
- * On platforms using this chip, and not having ordered WC stores, we
- * can get TXE parity errors due to speculative reads to the PIO buffers,
- * and this, due to a chip bug can result in (many) false parity error
- * reports.  So it's a debug print on those, and an info print on systems
- * where the speculative reads don't occur.
- * Because we can get lots of false errors, we have no upper limit
- * on recovery attempts on those platforms.
- */
-static int ipath_pe_txe_recover(struct ipath_devdata *dd)
-{
-       if (ipath_unordered_wc())
-               ipath_dbg("Recovering from TXE PIO parity error\n");
-       else {
-               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;
-}
 
 /* no interrupt fallback for these chips */
 static int ipath_pe_nointr_fallback(struct ipath_devdata *dd)
index 3da8dd79d26e941843055f0fbe3c65b970db2aa1..31d79e246aa0191f9915c3027d600a3324b5205a 100644 (file)
@@ -396,14 +396,13 @@ struct ipath_devdata {
        unsigned long ipath_wc_len;
        /* ref count for each pkey */
        atomic_t ipath_pkeyrefs[4];
-       /* shadow copy of all exptids physaddr; used only by funcsim */
-       u64 *ipath_tidsimshadow;
        /* shadow copy of struct page *'s for exp tid pages */
        struct page **ipath_pageshadow;
        /* shadow copy of dma handles for exp tid pages */
        dma_addr_t *ipath_physshadow;
        u64 __iomem *ipath_egrtidbase;
-       /* lock to workaround chip bug 9437 */
+       /* lock to workaround chip bug 9437 and others */
+       spinlock_t ipath_kernel_tid_lock;
        spinlock_t ipath_tid_lock;
        spinlock_t ipath_sendctrl_lock;