]> err.no Git - linux-2.6/blobdiff - drivers/infiniband/hw/ipath/ipath_iba7220.c
Merge branches 'at91', 'dyntick', 'ep93xx', 'iop', 'ixp', 'misc', 'orion', 'omap...
[linux-2.6] / drivers / infiniband / hw / ipath / ipath_iba7220.c
index 1b2de2cfb69b01d511f83faf245d2c19012a978e..8eee7830f042b3d05b20fa4955295905294378a3 100644 (file)
@@ -595,7 +595,7 @@ static void ipath_7220_txe_recover(struct ipath_devdata *dd)
 
        dev_info(&dd->pcidev->dev,
                "Recovering from TXE PIO parity error\n");
-       ipath_disarm_senderrbufs(dd, 1);
+       ipath_disarm_senderrbufs(dd);
 }
 
 
@@ -675,10 +675,8 @@ static void ipath_7220_handle_hwerrors(struct ipath_devdata *dd, char *msg,
        ctrl = ipath_read_kreg32(dd, dd->ipath_kregs->kr_control);
        if ((ctrl & INFINIPATH_C_FREEZEMODE) && !ipath_diag_inuse) {
                /*
-                * Parity errors in send memory are recoverable,
-                * just cancel the send (if indicated in * sendbuffererror),
-                * count the occurrence, unfreeze (if no other handled
-                * hardware error bits are set), and continue.
+                * Parity errors in send memory are recoverable by h/w
+                * just do housekeeping, exit freeze mode and continue.
                 */
                if (hwerrs & ((INFINIPATH_HWE_TXEMEMPARITYERR_PIOBUF |
                               INFINIPATH_HWE_TXEMEMPARITYERR_PIOPBC)
@@ -687,13 +685,6 @@ static void ipath_7220_handle_hwerrors(struct ipath_devdata *dd, char *msg,
                        hwerrs &= ~((INFINIPATH_HWE_TXEMEMPARITYERR_PIOBUF |
                                     INFINIPATH_HWE_TXEMEMPARITYERR_PIOPBC)
                                    << INFINIPATH_HWE_TXEMEMPARITYERR_SHIFT);
-                       if (!hwerrs) {
-                               /* else leave in freeze mode */
-                               ipath_write_kreg(dd,
-                                                dd->ipath_kregs->kr_control,
-                                                dd->ipath_control);
-                               goto bail;
-                       }
                }
                if (hwerrs) {
                        /*
@@ -723,8 +714,8 @@ static void ipath_7220_handle_hwerrors(struct ipath_devdata *dd, char *msg,
                        *dd->ipath_statusp |= IPATH_STATUS_HWERROR;
                        dd->ipath_flags &= ~IPATH_INITTED;
                } else {
-                       ipath_dbg("Clearing freezemode on ignored hardware "
-                                 "error\n");
+                       ipath_dbg("Clearing freezemode on ignored or "
+                               "recovered hardware error\n");
                        ipath_clear_freeze(dd);
                }
        }
@@ -870,8 +861,9 @@ static int ipath_7220_boardname(struct ipath_devdata *dd, char *name,
                              "revision %u.%u!\n",
                              dd->ipath_majrev, dd->ipath_minrev);
                ret = 1;
-       } else if (dd->ipath_minrev == 1) {
-               /* Rev1 chips are prototype. Complain, but allow use */
+       } else if (dd->ipath_minrev == 1 &&
+               !(dd->ipath_flags & IPATH_INITTED)) {
+               /* Rev1 chips are prototype. Complain at init, but allow use */
                ipath_dev_err(dd, "Unsupported hardware "
                              "revision %u.%u, Contact support@qlogic.com\n",
                              dd->ipath_majrev, dd->ipath_minrev);
@@ -1215,13 +1207,13 @@ static int ipath_msi_enabled(struct pci_dev *pdev)
 
 /*
  * disable msi interrupt if enabled, and clear the flag.
- * flag is used primarily for the fallback to IntX, but
+ * flag is used primarily for the fallback to INTx, but
  * is also used in reinit after reset as a flag.
  */
 static void ipath_7220_nomsi(struct ipath_devdata *dd)
 {
        dd->ipath_msi_lo = 0;
-#ifdef CONFIG_PCI_MSI
+
        if (ipath_msi_enabled(dd->pcidev)) {
                /*
                 * free, but don't zero; later kernels require
@@ -1232,7 +1224,6 @@ static void ipath_7220_nomsi(struct ipath_devdata *dd)
                        free_irq(dd->ipath_irq, dd);
                pci_disable_msi(dd->pcidev);
        }
-#endif
 }
 
 /*
@@ -1344,7 +1335,7 @@ static int ipath_setup_7220_config(struct ipath_devdata *dd,
        u32 boardrev;
 
        dd->ipath_msi_lo = 0;   /* used as a flag during reset processing */
-#ifdef CONFIG_PCI_MSI
+
        pos = pci_find_capability(pdev, PCI_CAP_ID_MSI);
        if (!strcmp(int_type, "force_msi") || !strcmp(int_type, "auto"))
                ret = pci_enable_msi(pdev);
@@ -1377,10 +1368,6 @@ static int ipath_setup_7220_config(struct ipath_devdata *dd,
        } else
                ipath_dev_err(dd, "Can't find MSI capability, "
                              "can't save MSI settings for reset\n");
-#else
-       ipath_dbg("PCI_MSI not configured, using IntX interrupts\n");
-       ipath_enable_intx(pdev);
-#endif
 
        dd->ipath_irq = pdev->irq;
 
@@ -1583,7 +1570,7 @@ static void ipath_init_7220_variables(struct ipath_devdata *dd)
 static int ipath_reinit_msi(struct ipath_devdata *dd)
 {
        int ret = 0;
-#ifdef CONFIG_PCI_MSI
+
        int pos;
        u16 control;
        if (!dd->ipath_msi_lo) /* Using intX, or init problem */
@@ -1617,10 +1604,10 @@ static int ipath_reinit_msi(struct ipath_devdata *dd)
                              ((control & PCI_MSI_FLAGS_64BIT) ? 12 : 8),
                              dd->ipath_msi_data);
        ret = 1;
+
 bail:
-#endif
        if (!ret) {
-               ipath_dbg("Using IntX, MSI disabled or not configured\n");
+               ipath_dbg("Using INTx, MSI disabled or not configured\n");
                ipath_enable_intx(dd->pcidev);
                ret = 1;
        }
@@ -1971,7 +1958,7 @@ static void ipath_7220_config_ports(struct ipath_devdata *dd, ushort cfgports)
                         dd->ipath_rcvctrl);
        dd->ipath_p0_rcvegrcnt = 2048; /* always */
        if (dd->ipath_flags & IPATH_HAS_SEND_DMA)
-               dd->ipath_pioreserved = 1; /* reserve a buffer */
+               dd->ipath_pioreserved = 3; /* kpiobufs used for PIO */
 }
 
 
@@ -2149,12 +2136,12 @@ static void ipath_7220_read_counters(struct ipath_devdata *dd,
                counters[i] = ipath_snap_cntr(dd, i);
 }
 
-/* if we are using MSI, try to fallback to IntX */
+/* if we are using MSI, try to fallback to INTx */
 static int ipath_7220_intr_fallback(struct ipath_devdata *dd)
 {
        if (dd->ipath_msi_lo) {
                dev_info(&dd->pcidev->dev, "MSI interrupt not detected,"
-                       " trying IntX interrupts\n");
+                       " trying INTx interrupts\n");
                ipath_7220_nomsi(dd);
                ipath_enable_intx(dd->pcidev);
                /*
@@ -2167,7 +2154,7 @@ static int ipath_7220_intr_fallback(struct ipath_devdata *dd)
                if (request_irq(dd->ipath_irq, ipath_intr, IRQF_SHARED,
                        IPATH_DRV_NAME, dd))
                        ipath_dev_err(dd,
-                               "Could not re-request_irq for IntX\n");
+                               "Could not re-request_irq for INTx\n");
                return 1;
        }
        return 0;