Skip to content

Commit 157c596

Browse files
Pradeep GopanapalliLinuxMinion
authored andcommitted
Fixed wrongly checked return type Added Debug print
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 <[email protected]> Signed-off-by: Pradeep Gopanapalli <[email protected]> Reviewed-by: sajid zia <[email protected]> Signed-off-by: Qing Huang <[email protected]>
1 parent 804df7a commit 157c596

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

drivers/infiniband/ulp/xsigo/xscore/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ obj-$(CONFIG_INFINIBAND_XSCORE) := xscore.o
22
xscore-y := xscore_impl.o xs_ud.o xscore_api.o xsmp.o \
33
xscore_stats.o xscore_uadm.o
44

5-
ccflags-y += -DXSIGO_LOCAL_VERSION=\"6.0.r8008\"
5+
ccflags-y += -DXSIGO_LOCAL_VERSION=\"6.0.r8012\"
66
ccflags-y += -DRDMA_PORT_LINK_LAYER_CHANGES -DHAS_SKB_ACCESS_FUNCTIONS
77
ccflags-y += -DSCSI_STRUCT_CHANGES -DSCSI_TIMEOUT_CHANGES -DLLE
88
ccflags-y += -DXG_FRAG_SIZE_PRESENT -DXG_FRAG_PAGE_PRESENT

drivers/infiniband/ulp/xsigo/xscore/xscore_api.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,9 @@ static int xs_post_recv(struct xscore_conn_ctx *ctx, int offset, int n,
393393
ret = -ENOMEM;
394394
}
395395

396-
if (ret == ENOMEM) {
396+
if (ret == -ENOMEM) {
397+
IB_ERROR("%s Memory errors i%d ret%d",
398+
__func__, i, ret);
397399
if (fillholes)
398400
return ret;
399401
goto partial_failure;
@@ -701,6 +703,9 @@ static int xscore_poll_recv(struct xscore_conn_ctx *ctx)
701703
err++;
702704
break;
703705
}
706+
if (wc.status)
707+
IB_ERROR("%s completion error wr_id%d status %d\n",
708+
__func__, i, wc.status);
704709
desc = &ctx->rx_ring[i];
705710
if (desc->page) {
706711
for (j = 0; j < (desc->size / PAGE_SIZE); ++j)
@@ -719,7 +724,6 @@ static int xscore_poll_recv(struct xscore_conn_ctx *ctx)
719724
size = wc.byte_len;
720725

721726
xscore_reset_rxdescriptor(desc);
722-
723727
/*
724728
* Call completion callback, pass buffer size
725729
* and client arg and status
@@ -1443,8 +1447,9 @@ static void handle_cm_rep(struct xscore_conn_ctx *ctx)
14431447

14441448
if (ctx->features & XSCORE_RDMA_SUPPORT) {
14451449
attr_mask |= IB_QP_MAX_DEST_RD_ATOMIC;
1446-
qp_attr.max_dest_rd_atomic = min (ctx->port->xs_dev->dev_attr.max_qp_rd_atom,
1447-
rdma_responder_resources);
1450+
qp_attr.max_dest_rd_atomic =
1451+
min(ctx->port->xs_dev->dev_attr.max_qp_rd_atom,
1452+
rdma_responder_resources);
14481453
} else {
14491454
qp_attr.max_dest_rd_atomic = 4;
14501455
}

0 commit comments

Comments
 (0)