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>
/* 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
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;