]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
IB/ipath: enable GPIO interrupt on HT-460
authorBryan O'Sullivan <bos@pathscale.com>
Tue, 23 May 2006 18:32:34 +0000 (11:32 -0700)
committerRoland Dreier <rolandd@cisco.com>
Tue, 23 May 2006 20:29:34 +0000 (13:29 -0700)
This is required for even semi-decent performance on OpenIB.

Signed-off-by: Bryan O'Sullivan <bos@pathscale.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/ipath/ipath_eeprom.c
drivers/infiniband/hw/ipath/ipath_ht400.c
drivers/infiniband/hw/ipath/ipath_init_chip.c
drivers/infiniband/hw/ipath/ipath_kernel.h
drivers/infiniband/hw/ipath/ipath_pe800.c

index f11a900e8cd7dcd41ce421cb4b78050d6fd10c53..a2f1ceafcca9f67360d1187b8c58e9e5a813f3a0 100644 (file)
@@ -505,11 +505,10 @@ static u8 flash_csum(struct ipath_flash *ifp, int adjust)
  * ipath_get_guid - get the GUID from the i2c device
  * @dd: the infinipath device
  *
- * When we add the multi-chip support, we will probably have to add
- * the ability to use the number of guids field, and get the guid from
- * the first chip's flash, to use for all of them.
+ * We have the capability to use the ipath_nguid field, and get
+ * the guid from the first chip's flash, to use for all of them.
  */
-void ipath_get_guid(struct ipath_devdata *dd)
+void ipath_get_eeprom_info(struct ipath_devdata *dd)
 {
        void *buf;
        struct ipath_flash *ifp;
index 4652435998f35fde8020b1ceb3e124ff320d4cf8..fac0a2b74de2e3d08d054322157b773bc5b79967 100644 (file)
@@ -607,7 +607,12 @@ static int ipath_ht_boardname(struct ipath_devdata *dd, char *name,
        case 4:         /* Ponderosa is one of the bringup boards */
                n = "Ponderosa";
                break;
-       case 5:         /* HT-460 original production board */
+       case 5:
+               /*
+                * HT-460 original production board; two production levels, with
+                * different serial number ranges.   See ipath_ht_early_init() for
+                * case where we enable IPATH_GPIO_INTR for later serial # range.
+                */
                n = "InfiniPath_HT-460";
                break;
        case 6:
@@ -642,7 +647,7 @@ static int ipath_ht_boardname(struct ipath_devdata *dd, char *name,
        if (n)
                snprintf(name, namelen, "%s", n);
 
-       if (dd->ipath_majrev != 3 || dd->ipath_minrev != 2) {
+       if (dd->ipath_majrev != 3 || (dd->ipath_minrev < 2 || dd->ipath_minrev > 3)) {
                /*
                 * This version of the driver only supports the HT-400
                 * Rev 3.2
@@ -1520,6 +1525,18 @@ static int ipath_ht_early_init(struct ipath_devdata *dd)
         */
        ipath_write_kreg(dd, dd->ipath_kregs->kr_sendctrl,
                         INFINIPATH_S_ABORT);
+
+       ipath_get_eeprom_info(dd);
+       if(dd->ipath_boardrev == 5 && dd->ipath_serial[0] == '1' &&
+               dd->ipath_serial[1] == '2' && dd->ipath_serial[2] == '8') {
+               /*
+                * Later production HT-460 has same changes as HT-465, so
+                * can use GPIO interrupts.  They have serial #'s starting
+                * with 128, rather than 112.
+                */
+               dd->ipath_flags |= IPATH_GPIO_INTR;
+               dd->ipath_flags &= ~IPATH_POLL_RX_INTR;
+       }
        return 0;
 }
 
index 16f640e1c16e2bbd3638f6b8250f42c0f7cbfdc9..dc83250d26a6a1dc3bf31f92385be816b6b7aca4 100644 (file)
@@ -879,7 +879,6 @@ int ipath_init_chip(struct ipath_devdata *dd, int reinit)
 
 done:
        if (!ret) {
-               ipath_get_guid(dd);
                *dd->ipath_statusp |= IPATH_STATUS_CHIP_PRESENT;
                if (!dd->ipath_f_intrsetup(dd)) {
                        /* now we can enable all interrupts from the chip */
index e6507f8115bc65b042bdb3f7596934b8560fb1f4..5d92d57b6f5479310a8206812d6d2516e526f71b 100644 (file)
@@ -650,7 +650,7 @@ u32 __iomem *ipath_getpiobuf(struct ipath_devdata *, u32 *);
 void ipath_init_pe800_funcs(struct ipath_devdata *);
 /* init HT-400-specific func */
 void ipath_init_ht400_funcs(struct ipath_devdata *);
-void ipath_get_guid(struct ipath_devdata *);
+void ipath_get_eeprom_info(struct ipath_devdata *);
 u64 ipath_snap_cntr(struct ipath_devdata *, ipath_creg);
 
 /*
index 6318067ab5ec751dd755108c7750bcfc89402e53..02e8c75b24f6d175ebde6b42a52da54429d0459b 100644 (file)
@@ -1180,6 +1180,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;
 }