The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=3968a8759027b9bb225b439e47f077b3f5b1171f
commit 3968a8759027b9bb225b439e47f077b3f5b1171f Author: Potnuri Bharat Teja <[email protected]> AuthorDate: 2021-02-22 05:57:54 +0000 Commit: John Baldwin <[email protected]> CommitDate: 2026-09-15 14:22:40 +0000 iw_cxgbe/libcxgb4: Pass ftid_base to libcxgb4 through status page While here, fix incorrect frees in error paths in c4iw_alloc_context(). Sponsored by: Chelsio Communications --- contrib/ofed/libcxgb4/dev.c | 4 ++-- contrib/ofed/libcxgb4/t4.h | 2 +- sys/dev/cxgbe/iw_cxgbe/device.c | 1 + sys/dev/cxgbe/iw_cxgbe/t4.h | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/contrib/ofed/libcxgb4/dev.c b/contrib/ofed/libcxgb4/dev.c index a5e4d04f78ab..fc2f4c9934a5 100644 --- a/contrib/ofed/libcxgb4/dev.c +++ b/contrib/ofed/libcxgb4/dev.c @@ -217,9 +217,9 @@ err_free: if (rhp->cqid2ptr) free(rhp->cqid2ptr); if (rhp->qpid2ptr) - free(rhp->cqid2ptr); + free(rhp->qpid2ptr); if (rhp->mmid2ptr) - free(rhp->cqid2ptr); + free(rhp->mmid2ptr); free(context); return NULL; } diff --git a/contrib/ofed/libcxgb4/t4.h b/contrib/ofed/libcxgb4/t4.h index 34f8db74e4e9..45b5b34ceab2 100644 --- a/contrib/ofed/libcxgb4/t4.h +++ b/contrib/ofed/libcxgb4/t4.h @@ -753,7 +753,7 @@ struct t4_dev_status_page u8 wc_supported; u8 write_cmpl_supported; u8 pad2; - u32 pad3; + u32 fid_base; u64 qp_start; u64 qp_size; u64 cq_start; diff --git a/sys/dev/cxgbe/iw_cxgbe/device.c b/sys/dev/cxgbe/iw_cxgbe/device.c index c467eea7534d..4cd47bd4ad02 100644 --- a/sys/dev/cxgbe/iw_cxgbe/device.c +++ b/sys/dev/cxgbe/iw_cxgbe/device.c @@ -151,6 +151,7 @@ c4iw_rdev_open(struct c4iw_rdev *rdev) rdev->status_page->qp_size = sc->vres.qp.size; rdev->status_page->cq_start = sc->vres.cq.start; rdev->status_page->cq_size = sc->vres.cq.size; + rdev->status_page->fid_base = sc->tids.ftid_base; /* T5 and above devices don't need Doorbell recovery logic, * so db_off is always set to '0'. diff --git a/sys/dev/cxgbe/iw_cxgbe/t4.h b/sys/dev/cxgbe/iw_cxgbe/t4.h index 742956ff772c..e9ecdd4617ca 100644 --- a/sys/dev/cxgbe/iw_cxgbe/t4.h +++ b/sys/dev/cxgbe/iw_cxgbe/t4.h @@ -726,7 +726,7 @@ struct t4_dev_status_page { u8 wc_supported; u8 write_cmpl_supported; u8 pad2; - u32 pad3; + u32 fid_base; u64 qp_start; u64 qp_size; u64 cq_start;
