aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/bnxt_re/main.c
diff options
context:
space:
mode:
authorSomnath Kotur <somnath.kotur@broadcom.com>2017-10-13 11:38:00 +0530
committerDoug Ledford <dledford@redhat.com>2017-10-18 10:24:12 -0400
commita0ddc2ec8f2912a738165b0ce47b9d945a9e3709 (patch)
treea30c4e0df9e0420c6dcfcb805c790cad10698b1a /drivers/infiniband/hw/bnxt_re/main.c
parentIB/hfi1: Add MODULE_FIRMWARE statements (diff)
downloadlinux-dev-a0ddc2ec8f2912a738165b0ce47b9d945a9e3709.tar.xz
linux-dev-a0ddc2ec8f2912a738165b0ce47b9d945a9e3709.zip
bnxt_re: Fix incorrect usage of test_bit()
test_bit() takes a bit number while the 'flags' field in struct bnxt_qplib_rcfw was using actual BIT position converted values. Fix this by assigning bit numbers and use consistent APIs all the flag values. Also logging a message in case of failure. Thanks to Dan Carpenter for pointing this out. Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to '')
-rw-r--r--drivers/infiniband/hw/bnxt_re/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/bnxt_re/main.c b/drivers/infiniband/hw/bnxt_re/main.c
index e7450ea92aa9..87f8a5d5d78f 100644
--- a/drivers/infiniband/hw/bnxt_re/main.c
+++ b/drivers/infiniband/hw/bnxt_re/main.c
@@ -1071,9 +1071,10 @@ static int bnxt_re_ib_reg(struct bnxt_re_dev *rdev)
*/
rc = bnxt_qplib_alloc_rcfw_channel(rdev->en_dev->pdev, &rdev->rcfw,
BNXT_RE_MAX_QPC_COUNT);
- if (rc)
+ if (rc) {
+ pr_err("Failed to allocate RCFW Channel: %#x\n", rc);
goto fail;
-
+ }
rc = bnxt_re_net_ring_alloc
(rdev, rdev->rcfw.creq.pbl[PBL_LVL_0].pg_map_arr,
rdev->rcfw.creq.pbl[rdev->rcfw.creq.level].pg_count,