]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/infiniband/hw/ipath/ipath_pe800.c
Merge branch 'genirq' of master.kernel.org:/home/rmk/linux-2.6-arm
[linux-2.6-omap-h63xx.git] / drivers / infiniband / hw / ipath / ipath_pe800.c
index e1dc4f757062a5ac8f9595fc197de26c20e7dda7..b83f66d8262cfb0830ea61e424ec68822123ce89 100644 (file)
@@ -1,4 +1,5 @@
 /*
+ * Copyright (c) 2006 QLogic, Inc. All rights reserved.
  * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved.
  *
  * This software is available to you under a choice of one of two
@@ -44,7 +45,7 @@
 
 /*
  * This file contains all the chip-specific register information and
- * access functions for the PathScale PE800, the PCI-Express chip.
+ * access functions for the QLogic InfiniPath PE800, the PCI-Express chip.
  *
  * This lists the InfiniPath PE800 registers, in the actual chip layout.
  * This structure should never be directly accessed.
@@ -532,7 +533,7 @@ static int ipath_pe_boardname(struct ipath_devdata *dd, char *name,
        if (n)
                snprintf(name, namelen, "%s", n);
 
-       if (dd->ipath_majrev != 4 || dd->ipath_minrev != 1) {
+       if (dd->ipath_majrev != 4 || !dd->ipath_minrev || dd->ipath_minrev>2) {
                ipath_dev_err(dd, "Unsupported PE-800 revision %u.%u!\n",
                              dd->ipath_majrev, dd->ipath_minrev);
                ret = 1;
@@ -972,6 +973,8 @@ static int ipath_setup_pe_reset(struct ipath_devdata *dd)
        /* Use ERROR so it shows up in logs, etc. */
        ipath_dev_err(dd, "Resetting PE-800 unit %u\n",
                      dd->ipath_unit);
+       /* keep chip from being accessed in a few places */
+       dd->ipath_flags &= ~(IPATH_INITTED|IPATH_PRESENT);
        val = dd->ipath_control | INFINIPATH_C_RESET;
        ipath_write_kreg(dd, dd->ipath_kregs->kr_control, val);
        mb();
@@ -997,6 +1000,8 @@ static int ipath_setup_pe_reset(struct ipath_devdata *dd)
                if ((r = pci_enable_device(dd->pcidev)))
                        ipath_dev_err(dd, "pci_enable_device failed after "
                                      "reset: %d\n", r);
+               /* whether it worked or not, mark as present, again */
+               dd->ipath_flags |= IPATH_PRESENT;
                val = ipath_read_kreg64(dd, dd->ipath_kregs->kr_revision);
                if (val == dd->ipath_revision) {
                        ipath_cdbg(VERBOSE, "Got matching revision "
@@ -1176,6 +1181,8 @@ static int ipath_pe_early_init(struct ipath_devdata *dd)
         */
        dd->ipath_rhdrhead_intr_off = 1ULL<<32;
 
+       ipath_get_eeprom_info(dd);
+
        return 0;
 }