]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
Fixed wrongly checked return type Added Debug print
authorPradeep Gopanapalli <pradeep.gopanapalli@oracle.com>
Tue, 9 Feb 2016 23:15:19 +0000 (23:15 +0000)
committerChuck Anderson <chuck.anderson@oracle.com>
Wed, 16 Mar 2016 15:03:34 +0000 (08:03 -0700)
In xs_post_recv instead of checking for -ENOMEM xscore driver is checking
 ENOMEM, fixed this by checking proper return type

Orabug: 22862488

Reported-by: Haakon Bugge <haakon.bugge@oracle.com>
Signed-off-by: Pradeep Gopanapalli <pradeep.gopanapalli@oracle.com>
Reviewed-by: sajid zia <szia@oracle.com>
Signed-off-by: Qing Huang <qing.huang@oracle.com>
drivers/infiniband/ulp/xsigo/xscore/Makefile
drivers/infiniband/ulp/xsigo/xscore/xscore_api.c

index 1814c4879d53dd29e03e978046f75cbcc82c45fc..2dfe848a30cd1470e7f65d3055ea6b0ed2045cf4 100644 (file)
@@ -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.r8008\"
+ccflags-y += -DXSIGO_LOCAL_VERSION=\"6.0.r8012\"
 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
index 8b00c2734cc696b04ee17178750e1c1c37888d03..524922010f2d5f088de8071bbdf8648f6c9e200f 100644 (file)
@@ -393,7 +393,9 @@ static int xs_post_recv(struct xscore_conn_ctx *ctx, int offset, int n,
                                ret = -ENOMEM;
                }
 
-               if (ret == ENOMEM) {
+               if (ret == -ENOMEM) {
+                       IB_ERROR("%s Memory errors i%d ret%d",
+                                __func__, i, ret);
                        if (fillholes)
                                return ret;
                        goto partial_failure;
@@ -701,6 +703,9 @@ static int xscore_poll_recv(struct xscore_conn_ctx *ctx)
                        err++;
                        break;
                }
+               if (wc.status)
+                       IB_ERROR("%s completion error wr_id%d status %d\n",
+                                       __func__, i, wc.status);
                desc = &ctx->rx_ring[i];
                if (desc->page) {
                        for (j = 0; j < (desc->size / PAGE_SIZE); ++j)
@@ -719,7 +724,6 @@ static int xscore_poll_recv(struct xscore_conn_ctx *ctx)
                size = wc.byte_len;
 
                xscore_reset_rxdescriptor(desc);
-
                /*
                 * Call completion callback, pass buffer size
                 * and client arg and status
@@ -1443,8 +1447,9 @@ static void handle_cm_rep(struct xscore_conn_ctx *ctx)
 
        if (ctx->features & XSCORE_RDMA_SUPPORT) {
                attr_mask |= IB_QP_MAX_DEST_RD_ATOMIC;
-               qp_attr.max_dest_rd_atomic = min (ctx->port->xs_dev->dev_attr.max_qp_rd_atom,
-                                               rdma_responder_resources);
+               qp_attr.max_dest_rd_atomic =
+                       min(ctx->port->xs_dev->dev_attr.max_qp_rd_atom,
+                                       rdma_responder_resources);
        } else {
                qp_attr.max_dest_rd_atomic = 4;
        }