IB/ipath: Indicate a couple of chip bugs to userspace
authorArthur Jones <arthur.jones@qlogic.com>
Tue, 18 Sep 2007 21:44:45 +0000 (14:44 -0700)
committerRoland Dreier <rolandd@cisco.com>
Wed, 10 Oct 2007 03:57:54 +0000 (20:57 -0700)
A couple of chip bugs in the iba6110 and in the iba6120 are not in more
recent chips.  This first bug swaps two of the pioavail register
locations.  In the second bug, the chip can sometimes forget to dma the
pio avail register to memory.  We indicate the presence of these bugs
with runtime flags and we indicate the presence of the flags by bumping
the SWMINOR.

Signed-off-by: Arthur Jones <arthur.jones@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/ipath/ipath_common.h
drivers/infiniband/hw/ipath/ipath_iba6110.c
drivers/infiniband/hw/ipath/ipath_iba6120.c

index 6ad822c35930417c558dba5f14e9f6dcb81df182..851df8a75e79cfc6ea5dc386530966f9a8c0206d 100644 (file)
@@ -189,6 +189,8 @@ typedef enum _ipath_ureg {
 #define IPATH_RUNTIME_RCVHDR_COPY      0x8
 #define IPATH_RUNTIME_MASTER   0x10
 /* 0x20 and 0x40 are no longer used, but are reserved for ABI compatibility */
+#define IPATH_RUNTIME_FORCE_PIOAVAIL 0x400
+#define IPATH_RUNTIME_PIO_REGSWAPPED 0x800
 
 /*
  * This structure is returned by ipath_userinit() immediately after
@@ -350,7 +352,7 @@ struct ipath_base_info {
  * may not be implemented; the user code must deal with this if it
  * cares, or it must abort after initialization reports the difference.
  */
-#define IPATH_USER_SWMINOR 5
+#define IPATH_USER_SWMINOR 6
 
 #define IPATH_USER_SWVERSION ((IPATH_USER_SWMAJOR<<16) | IPATH_USER_SWMINOR)
 
index d4940beb58c7a95b0df5cf2f416f342cfa790339..df42a1e3b6b7b3e5ddc55e7996cbaad09f524535 100644 (file)
@@ -1599,7 +1599,8 @@ static int ipath_ht_get_base_info(struct ipath_portdata *pd, void *kbase)
 {
        struct ipath_base_info *kinfo = kbase;
 
-       kinfo->spi_runtime_flags |= IPATH_RUNTIME_HT;
+       kinfo->spi_runtime_flags |= IPATH_RUNTIME_HT |
+               IPATH_RUNTIME_PIO_REGSWAPPED;
 
        if (pd->port_dd->ipath_minrev < 4)
                kinfo->spi_runtime_flags |= IPATH_RUNTIME_RCVHDR_COPY;
index d43f0b3a43fefe96d6e8e7d3566dfdbf82a38d83..0103d6f4847b7dcd354548a281b58fac48b1f8f7 100644 (file)
@@ -1348,7 +1348,8 @@ static int ipath_pe_get_base_info(struct ipath_portdata *pd, void *kbase)
        dd = pd->port_dd;
 
 done:
-       kinfo->spi_runtime_flags |= IPATH_RUNTIME_PCIE;
+       kinfo->spi_runtime_flags |= IPATH_RUNTIME_PCIE |
+               IPATH_RUNTIME_FORCE_PIOAVAIL | IPATH_RUNTIME_PIO_REGSWAPPED;
        return 0;
 }