Skip to content

Commit a7f7f55

Browse files
committed
Merge: RDMA/irdma: driver update to v6.11
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/5261 JIRA: https://issues.redhat.com/browse/RHEL-49824 Update irdma driver to upstream v6.11. Signed-off-by: Kamal Heib <kheib@redhat.com> Approved-by: José Ignacio Tornos Martínez <jtornosm@redhat.com> Approved-by: Ivan Vecera <ivecera@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Rado Vrbovsky <rvrbovsk@redhat.com>
2 parents f3c7bbc + 31ed77d commit a7f7f55

File tree

8 files changed

+243
-76
lines changed

8 files changed

+243
-76
lines changed

drivers/infiniband/hw/irdma/defs.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,7 @@ enum irdma_cqp_op_type {
346346
#define IRDMA_AE_LLP_TOO_MANY_KEEPALIVE_RETRIES 0x050b
347347
#define IRDMA_AE_LLP_DOUBT_REACHABILITY 0x050c
348348
#define IRDMA_AE_LLP_CONNECTION_ESTABLISHED 0x050e
349+
#define IRDMA_AE_LLP_TOO_MANY_RNRS 0x050f
349350
#define IRDMA_AE_RESOURCE_EXHAUSTION 0x0520
350351
#define IRDMA_AE_RESET_SENT 0x0601
351352
#define IRDMA_AE_TERMINATE_SENT 0x0602

drivers/infiniband/hw/irdma/hw.c

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,11 @@ static void irdma_process_aeq(struct irdma_pci_f *rf)
321321
break;
322322
case IRDMA_AE_QP_SUSPEND_COMPLETE:
323323
if (iwqp->iwdev->vsi.tc_change_pending) {
324-
atomic_dec(&iwqp->sc_qp.vsi->qp_suspend_reqs);
324+
if (!atomic_dec_return(&qp->vsi->qp_suspend_reqs))
325+
wake_up(&iwqp->iwdev->suspend_wq);
326+
}
327+
if (iwqp->suspend_pending) {
328+
iwqp->suspend_pending = false;
325329
wake_up(&iwqp->iwdev->suspend_wq);
326330
}
327331
break;
@@ -383,6 +387,7 @@ static void irdma_process_aeq(struct irdma_pci_f *rf)
383387
case IRDMA_AE_LLP_TOO_MANY_RETRIES:
384388
case IRDMA_AE_LCE_QP_CATASTROPHIC:
385389
case IRDMA_AE_LCE_FUNCTION_CATASTROPHIC:
390+
case IRDMA_AE_LLP_TOO_MANY_RNRS:
386391
case IRDMA_AE_LCE_CQ_CATASTROPHIC:
387392
case IRDMA_AE_UDA_XMIT_DGRAM_TOO_LONG:
388393
default:
@@ -588,9 +593,6 @@ static void irdma_destroy_cqp(struct irdma_pci_f *rf)
588593
struct irdma_cqp *cqp = &rf->cqp;
589594
int status = 0;
590595

591-
if (rf->cqp_cmpl_wq)
592-
destroy_workqueue(rf->cqp_cmpl_wq);
593-
594596
status = irdma_sc_cqp_destroy(dev->cqp);
595597
if (status)
596598
ibdev_dbg(to_ibdev(dev), "ERR: Destroy CQP failed %d\n", status);
@@ -755,6 +757,9 @@ static void irdma_destroy_ccq(struct irdma_pci_f *rf)
755757
struct irdma_ccq *ccq = &rf->ccq;
756758
int status = 0;
757759

760+
if (rf->cqp_cmpl_wq)
761+
destroy_workqueue(rf->cqp_cmpl_wq);
762+
758763
if (!rf->reset)
759764
status = irdma_sc_ccq_destroy(dev->ccq, 0, true);
760765
if (status)
@@ -1187,7 +1192,6 @@ static int irdma_create_ceq(struct irdma_pci_f *rf, struct irdma_ceq *iwceq,
11871192
int status;
11881193
struct irdma_ceq_init_info info = {};
11891194
struct irdma_sc_dev *dev = &rf->sc_dev;
1190-
u64 scratch;
11911195
u32 ceq_size;
11921196

11931197
info.ceq_id = ceq_id;
@@ -1208,14 +1212,13 @@ static int irdma_create_ceq(struct irdma_pci_f *rf, struct irdma_ceq *iwceq,
12081212
iwceq->sc_ceq.ceq_id = ceq_id;
12091213
info.dev = dev;
12101214
info.vsi = vsi;
1211-
scratch = (uintptr_t)&rf->cqp.sc_cqp;
12121215
status = irdma_sc_ceq_init(&iwceq->sc_ceq, &info);
12131216
if (!status) {
12141217
if (dev->ceq_valid)
12151218
status = irdma_cqp_ceq_cmd(&rf->sc_dev, &iwceq->sc_ceq,
12161219
IRDMA_OP_CEQ_CREATE);
12171220
else
1218-
status = irdma_sc_cceq_create(&iwceq->sc_ceq, scratch);
1221+
status = irdma_sc_cceq_create(&iwceq->sc_ceq, 0);
12191222
}
12201223

12211224
if (status) {

drivers/infiniband/hw/irdma/i40iw_if.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ static int i40iw_probe(struct auxiliary_device *aux_dev, const struct auxiliary_
186186
aux_dev);
187187
struct i40e_info *cdev_info = i40e_adev->ldev;
188188

189-
strncpy(i40iw_client.name, "irdma", I40E_CLIENT_STR_LENGTH);
189+
strscpy_pad(i40iw_client.name, "irdma", I40E_CLIENT_STR_LENGTH);
190190
i40e_client_device_register(cdev_info, &i40iw_client);
191191

192192
return 0;

drivers/infiniband/hw/irdma/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ static void irdma_prep_tc_change(struct irdma_device *iwdev)
4848
/* Wait for all qp's to suspend */
4949
wait_event_timeout(iwdev->suspend_wq,
5050
!atomic_read(&iwdev->vsi.qp_suspend_reqs),
51-
IRDMA_EVENT_TIMEOUT);
51+
msecs_to_jiffies(IRDMA_EVENT_TIMEOUT_MS));
5252
irdma_ws_reset(&iwdev->vsi);
5353
}
5454

drivers/infiniband/hw/irdma/main.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ extern struct auxiliary_driver i40iw_auxiliary_drv;
7878

7979
#define MAX_DPC_ITERATIONS 128
8080

81-
#define IRDMA_EVENT_TIMEOUT 50000
81+
#define IRDMA_EVENT_TIMEOUT_MS 5000
8282
#define IRDMA_VCHNL_EVENT_TIMEOUT 100000
8383
#define IRDMA_RST_TIMEOUT_HZ 4
8484

@@ -239,7 +239,7 @@ struct irdma_qv_info {
239239

240240
struct irdma_qvlist_info {
241241
u32 num_vectors;
242-
struct irdma_qv_info qv_info[];
242+
struct irdma_qv_info qv_info[] __counted_by(num_vectors);
243243
};
244244

245245
struct irdma_gen_ops {

drivers/infiniband/hw/irdma/utils.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1393,17 +1393,12 @@ int irdma_ieq_check_mpacrc(struct shash_desc *desc, void *addr, u32 len,
13931393
u32 val)
13941394
{
13951395
u32 crc = 0;
1396-
int ret;
1397-
int ret_code = 0;
13981396

1399-
crypto_shash_init(desc);
1400-
ret = crypto_shash_update(desc, addr, len);
1401-
if (!ret)
1402-
crypto_shash_final(desc, (u8 *)&crc);
1397+
crypto_shash_digest(desc, addr, len, (u8 *)&crc);
14031398
if (crc != val)
1404-
ret_code = -EINVAL;
1399+
return -EINVAL;
14051400

1406-
return ret_code;
1401+
return 0;
14071402
}
14081403

14091404
/**

0 commit comments

Comments
 (0)