From: Harald Høeg Date: Tue, 5 Jul 2016 16:41:04 +0000 (+0200) Subject: sif: vlink connect is now enabled by default X-Git-Tag: v4.1.12-92~87^2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=3c34a2b86f25dac88d5dcc76b074db51d54f9e4c;p=users%2Fjedix%2Flinux-maple.git sif: vlink connect is now enabled by default 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 Reviewed-by: Håkon Bugge Signed-off-by: Knut Omang --- diff --git a/drivers/infiniband/hw/sif/sif_dev.h b/drivers/infiniband/hw/sif/sif_dev.h index 59d9a2d3b8db..53b2e354b2ae 100644 --- a/drivers/infiniband/hw/sif/sif_dev.h +++ b/drivers/infiniband/hw/sif/sif_dev.h @@ -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 diff --git a/drivers/infiniband/hw/sif/sif_epsc.c b/drivers/infiniband/hw/sif/sif_epsc.c index 541eb1faf9a5..b1696bf7474e 100644 --- a/drivers/infiniband/hw/sif/sif_epsc.c +++ b/drivers/infiniband/hw/sif/sif_epsc.c @@ -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;