]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sif: vlink connect is now enabled by default
authorHarald Høeg <harald.hoeg@oracle.com>
Tue, 5 Jul 2016 16:41:04 +0000 (18:41 +0200)
committerSantosh Shilimkar <santosh.shilimkar@oracle.com>
Fri, 12 Aug 2016 19:18:13 +0000 (12:18 -0700)
This fix makes default link failover behaviour compatible with existing
mellanox CX3. Internal link status (PortState) will now follow external
link status (PortState) by default.

Driver feature mask SIFF_vlink_disconnect may be used to set default
behaviour to "vlink connect"=disabled.

Orabug: 24445370

Signed-off-by: Harald Høeg <harald.hoeg@oracle.com>
Reviewed-by: Håkon Bugge <haakon.bugge@oracle.com>
Signed-off-by: Knut Omang <knut.omang@oracle.com>
drivers/infiniband/hw/sif/sif_dev.h
drivers/infiniband/hw/sif/sif_epsc.c

index 59d9a2d3b8db27a8587048f4be453222803134be..53b2e354b2ae22c552d48c5e78b5ea9bacc8e4e2 100644 (file)
@@ -619,8 +619,10 @@ 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
+/* Default behavior is: Make all vlinks behave in sync with the correspondinding external port.
+ * This flag turns off this behavior and the vlink state becomes unrelated to physical link.
+ */
+#define SIFF_vlink_disconnect      0x10000
 
 /* Don't allocate vcbs in a round robin fashion */
 #define SIFF_alloc_cb_round_robin      0x20000
index 541eb1faf9a5d6ed89a7c382b6839deeff3650fd..b1696bf7474eb25e6f90b500d5b5d176213007ec 100644 (file)
@@ -737,9 +737,10 @@ 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.vlink_connect = 1;
+       if (!sdev->is_vf && sif_feature(vlink_disconnect)) {
+               sif_log(sdev, SIF_INIT, "Disassociate all vlink state info from state of external port");
+               lconfig.vlink_connect = 0;
        }
 
        lconfig.sparc_pages = (sdev->mi.page_size == 0x2000) ? 1 : 0;