hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/infiniband/hw/bnxt_re/main.c
....@@ -294,15 +294,21 @@
294294 for (indx = 0; indx < rdev->num_msix; indx++)
295295 rdev->msix_entries[indx].vector = ent[indx].vector;
296296
297
- bnxt_qplib_rcfw_start_irq(rcfw, msix_ent[BNXT_RE_AEQ_IDX].vector,
298
- false);
297
+ rc = bnxt_qplib_rcfw_start_irq(rcfw, msix_ent[BNXT_RE_AEQ_IDX].vector,
298
+ false);
299
+ if (rc) {
300
+ ibdev_warn(&rdev->ibdev, "Failed to reinit CREQ\n");
301
+ return;
302
+ }
299303 for (indx = BNXT_RE_NQ_IDX ; indx < rdev->num_msix; indx++) {
300304 nq = &rdev->nq[indx - 1];
301305 rc = bnxt_qplib_nq_start_irq(nq, indx - 1,
302306 msix_ent[indx].vector, false);
303
- if (rc)
307
+ if (rc) {
304308 ibdev_warn(&rdev->ibdev, "Failed to reinit NQ index %d\n",
305309 indx - 1);
310
+ return;
311
+ }
306312 }
307313 }
308314
....@@ -1185,12 +1191,6 @@
11851191 if (!ib_device_try_get(&rdev->ibdev))
11861192 return 0;
11871193
1188
- if (!sgid_tbl) {
1189
- ibdev_err(&rdev->ibdev, "QPLIB: SGID table not allocated");
1190
- rc = -EINVAL;
1191
- goto out;
1192
- }
1193
-
11941194 for (index = 0; index < sgid_tbl->active; index++) {
11951195 gid_idx = sgid_tbl->hw_id[index];
11961196
....@@ -1208,7 +1208,7 @@
12081208 rc = bnxt_qplib_update_sgid(sgid_tbl, &gid, gid_idx,
12091209 rdev->qplib_res.netdev->dev_addr);
12101210 }
1211
-out:
1211
+
12121212 ib_device_put(&rdev->ibdev);
12131213 return rc;
12141214 }