From 6863387e700570bfab944df8b8de6f37629d30a6 Mon Sep 17 00:00:00 2001 From: Pradeep Gopanapalli Date: Tue, 1 Mar 2016 01:45:59 +0000 Subject: [PATCH] Fixed vnic issue after saturn reset After saturn reboots uVnic will not recover The issue happens When a host connected to NM3 via infiniband switch. The fact here is xve driver sets OPER_DOWN when it losses HEART_BEAT and there is no way for it set this state back . Fixing this by disjoining Multicast group once HeartBeat is lost and joining back once saturn comes back Orabug: 22862488 Reported-by: Ye Jin Signed-off-by: Pradeep Gopanapalli Reviewed-by: sajid zia Signed-off-by: Qing Huang --- drivers/infiniband/ulp/xsigo/xscore/Makefile | 2 +- drivers/infiniband/ulp/xsigo/xsvhba/Makefile | 2 +- drivers/infiniband/ulp/xsigo/xsvnic/Makefile | 2 +- drivers/infiniband/ulp/xsigo/xve/Makefile | 2 +- drivers/infiniband/ulp/xsigo/xve/xve_main.c | 3 ++- drivers/infiniband/ulp/xsigo/xve/xve_stats.c | 1 + 6 files changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/infiniband/ulp/xsigo/xscore/Makefile b/drivers/infiniband/ulp/xsigo/xscore/Makefile index 765e555d7034..00721312de46 100644 --- a/drivers/infiniband/ulp/xsigo/xscore/Makefile +++ b/drivers/infiniband/ulp/xsigo/xscore/Makefile @@ -2,7 +2,7 @@ obj-$(CONFIG_INFINIBAND_XSCORE) := xscore.o xscore-y := xscore_impl.o xs_ud.o xscore_api.o xsmp.o \ xscore_stats.o xscore_uadm.o -ccflags-y += -DXSIGO_LOCAL_VERSION=\"6.0.r8014\" +ccflags-y += -DXSIGO_LOCAL_VERSION=\"6.0.r8016\" ccflags-y += -DRDMA_PORT_LINK_LAYER_CHANGES -DHAS_SKB_ACCESS_FUNCTIONS ccflags-y += -DSCSI_STRUCT_CHANGES -DSCSI_TIMEOUT_CHANGES -DLLE ccflags-y += -DXG_FRAG_SIZE_PRESENT -DXG_FRAG_PAGE_PRESENT diff --git a/drivers/infiniband/ulp/xsigo/xsvhba/Makefile b/drivers/infiniband/ulp/xsigo/xsvhba/Makefile index b91ea2da3720..a97d7a15e761 100644 --- a/drivers/infiniband/ulp/xsigo/xsvhba/Makefile +++ b/drivers/infiniband/ulp/xsigo/xsvhba/Makefile @@ -3,7 +3,7 @@ xsvhba-y := vhba_main.o vhba_xsmp.o vhba_create.o vhba_init.o vhba_delete.o \ vhba_attr.o vhba_wq.o vhba_proc.o vhba_stats.o vhba_ib.o \ vhba_scsi_intf.o vhba_align.o -ccflags-y += -DXSIGO_LOCAL_VERSION=\"6.0.r8014\" +ccflags-y += -DXSIGO_LOCAL_VERSION=\"6.0.r8016\" ccflags-y += -DRDMA_PORT_LINK_LAYER_CHANGES -DHAS_SKB_ACCESS_FUNCTIONS ccflags-y += -DSCSI_STRUCT_CHANGES -DSCSI_TIMEOUT_CHANGES -DLLE ccflags-y += -DXG_FRAG_SIZE_PRESENT -DXG_FRAG_PAGE_PRESENT diff --git a/drivers/infiniband/ulp/xsigo/xsvnic/Makefile b/drivers/infiniband/ulp/xsigo/xsvnic/Makefile index 983e7820bb4a..5f853927ff30 100644 --- a/drivers/infiniband/ulp/xsigo/xsvnic/Makefile +++ b/drivers/infiniband/ulp/xsigo/xsvnic/Makefile @@ -1,7 +1,7 @@ obj-$(CONFIG_INFINIBAND_XSVNIC) := xsvnic.o xsvnic-y := xsvnic_main.o xsvnic_stats.o -ccflags-y += -DXSIGO_LOCAL_VERSION=\"6.0.r8014\" +ccflags-y += -DXSIGO_LOCAL_VERSION=\"6.0.r8016\" ccflags-y += -DRDMA_PORT_LINK_LAYER_CHANGES -DHAS_SKB_ACCESS_FUNCTIONS ccflags-y += -DSCSI_STRUCT_CHANGES -DSCSI_TIMEOUT_CHANGES -DLLE ccflags-y += -DXG_FRAG_SIZE_PRESENT -DXG_FRAG_PAGE_PRESENT diff --git a/drivers/infiniband/ulp/xsigo/xve/Makefile b/drivers/infiniband/ulp/xsigo/xve/Makefile index f217d4feadb0..be33126eff94 100644 --- a/drivers/infiniband/ulp/xsigo/xve/Makefile +++ b/drivers/infiniband/ulp/xsigo/xve/Makefile @@ -2,7 +2,7 @@ obj-$(CONFIG_INFINIBAND_XVE) := xve.o xve-y := xve_main.o xve_verbs.o xve_multicast.o xve_ib.o xve_tables.o \ xve_ethtool.o xve_cm.o xve_stats.o -ccflags-y += -DXSIGO_LOCAL_VERSION=\"6.0.r8014\" +ccflags-y += -DXSIGO_LOCAL_VERSION=\"6.0.r8016\" ccflags-y += -DRDMA_PORT_LINK_LAYER_CHANGES -DHAS_SKB_ACCESS_FUNCTIONS ccflags-y += -DSCSI_STRUCT_CHANGES -DSCSI_TIMEOUT_CHANGES -DLLE ccflags-y += -DXG_FRAG_SIZE_PRESENT -DXG_FRAG_PAGE_PRESENT diff --git a/drivers/infiniband/ulp/xsigo/xve/xve_main.c b/drivers/infiniband/ulp/xsigo/xve/xve_main.c index ff1af5d0fa65..ef1639c68301 100644 --- a/drivers/infiniband/ulp/xsigo/xve/xve_main.c +++ b/drivers/infiniband/ulp/xsigo/xve/xve_main.c @@ -1605,9 +1605,10 @@ static int xve_state_machine(struct xve_dev_priv *priv) xve_flush_paths(priv->netdev); spin_lock_irqsave(&priv->lock, flags); - xve_set_oper_down(priv); + /* Disjoin from multicast Group */ set_bit(XVE_HBEAT_LOST, &priv->state); spin_unlock_irqrestore(&priv->lock, flags); + xve_queue_work(priv, XVE_WQ_START_FLUSHNORMAL); } priv->counters[XVE_STATE_MACHINE_UP]++; if (!test_bit(XVE_OPER_REP_SENT, &priv->state)) diff --git a/drivers/infiniband/ulp/xsigo/xve/xve_stats.c b/drivers/infiniband/ulp/xsigo/xve/xve_stats.c index 7db8fe3812da..a6d09d9728e3 100755 --- a/drivers/infiniband/ulp/xsigo/xve/xve_stats.c +++ b/drivers/infiniband/ulp/xsigo/xve/xve_stats.c @@ -449,6 +449,7 @@ static int xve_proc_read_device(struct seq_file *m, void *data) tmp_buf[0] = 0; print_mgid_buf(tmp_buf, local_gid_token); + seq_printf(m, "Type:\t\t\t\t%s\n", (vp->vnic_type) ? "EDR" : "Legacy"); seq_printf(m, "Local gid:\t\t\t%s\n", tmp_buf); seq_printf(m, "MAC addr:\t\t\t0x%Lx\n", vp->mac); seq_printf(m, "VID:\t\t\t\t0x%Lx\n", vp->resource_id); -- 2.50.1