]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sif: Add a feature mask to allow internal vlink state to follow ext.links
authorKnut Omang <knut.omang@oracle.com>
Tue, 28 Jun 2016 07:24:45 +0000 (09:24 +0200)
committerKnut Omang <knut.omang@oracle.com>
Sun, 3 Jul 2016 14:44:13 +0000 (16:44 +0200)
SIF implements an internal IB switch for each port - all HCA vPorts are
connected to this switch, which again has a single external port
associated with the actual state of the physical port.

Some of the current management software assumes that a failed external port
of an HCA can be observed by looking at the local port, which is not
the case with SIF, where the local virtual port will not go down
if the external link goes down.

Firmware implements a mode to logically "wire" the vPort to the
corresponding physical port to mimic the legacy behaviour.

This mode can be enabled by OR'ing in 0x10000 in the module parameter
feature_mask. This is a temporary fix until management software can handle
this topology better.

Orabug: 23509653

Signed-off-by: Knut Omang <knut.omang@oracle.com>
drivers/infiniband/hw/sif/sif_dev.h
drivers/infiniband/hw/sif/sif_epsc.c

index e07869ce3c76fdef83163df48251ea3e1ecc44d7..b767004191c72980cd9e2eaeabf1934db42d247f 100644 (file)
@@ -599,7 +599,7 @@ extern ulong sif_feature_mask;
 #define SIFF_no_huge_pages               0x80
 
 /* Use stencil pqp for invalidation of FMR keys */
-#define SIFF_disable_stencil_invalidate          0x100
+#define SIFF_disable_stencil_invalidate         0x100
 
 /* Force disable vpci iommu trapping (to operate as on real hardware..) */
 #define SIFF_disable_vpci_iommu                 0x400
@@ -616,11 +616,14 @@ extern ulong sif_feature_mask;
 /* Check all event queues on all interrupts */
 #define SIFF_check_all_eqs_on_intr     0x8000
 
+/* Make all vlinks behave in sync with the correspondinding external port */
+#define SIFF_vlink_connect            0x10000
+
 /* Don't allocate vcbs in a round robin fashion */
-#define SIFF_alloc_cb_round_robin 0x20000
+#define SIFF_alloc_cb_round_robin      0x20000
 
 /* Don't allocate from all other queues (except cb and qp) in a round robin fashion */
-#define SIFF_disable_alloc_round_robin    0x40000
+#define SIFF_disable_alloc_round_robin 0x40000
 
 /* Default on rev1 is to force rnr_retry_init to 0 - this feature
  * forces it to 7 (infinite retry) instead:
@@ -668,7 +671,7 @@ extern ulong sif_feature_mask;
 /* Configure PSIF to use the opposite base page size (e.g. 8K on x86 and 4K on sparc) */
 #define SIFF_toggle_page_size        0x40000000
 
-#define SIFF_all_features           0x7ffeddfb
+#define SIFF_all_features           0x7fffddfb
 
 #define sif_feature(x) (sif_feature_mask & (SIFF_##x))
 
index 70286d97ff8378ccce2175bcd86721e27ab88a44..01f79c87114e2ca6e457e5e5b11e1a0c46f41cc2 100644 (file)
@@ -717,6 +717,11 @@ int sif_eps_init(struct sif_dev *sdev, enum sif_tab_type type)
        sif_log(sdev, SIF_INFO, "Configure for big endian host");
        lconfig.big_endian = 1;
 #endif
+       if (!sdev->is_vf && sif_feature(vlink_connect)) {
+               sif_log(sdev, SIF_INIT, "Associate all vlink state info with state of external port");
+               lconfig.vlink_connect = 1;
+       }
+
        lconfig.sparc_pages = (sdev->mi.page_size == 0x2000) ? 1 : 0;
        if (rsp_tp->mem->mem_type != SIFMT_BYPASS) {
                sif_log(sdev, SIF_INFO,