From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CFDFB2EBB8C; Tue, 11 Nov 2025 01:39:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762825160; cv=none; b=aMqXL67uj++h0xt8gCOKYxVtQt0FxLC8/WV+J8Nv3Ox7I/9tQEqTcL95upPJztex6x0rq1b4OffDgl3NxQJRQvNS14Q4AFLdG8hDbIsclHW1mHnkZymF8ohkInMUMLqCals2kNHfevRQDFSDyQ8qaq/EVUWcKyuRQ7PzOsMjesY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762825160; c=relaxed/simple; bh=dZK7MV9Ilnion5UgmYk3geqiyCrQEV2zEEn/ImLTIDE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ULL1xnHJq0dh1GPopFHKh0ILEQkYYEJu23niWBRrflW5OPYHvMJd6ZoNQ9t66zPM3P3MdvfIZT0QbUeBZddoUNG6Kd0oyQWpsxw81s0pcsQpz6dxlCLi2ANZC8m15o44033Q0ETZBx/bTkLkWOmosLb4YcSOijvB7sQaPxk4cRs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=CMZPsh7Y; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="CMZPsh7Y" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5221DC113D0; Tue, 11 Nov 2025 01:39:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1762825160; bh=dZK7MV9Ilnion5UgmYk3geqiyCrQEV2zEEn/ImLTIDE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CMZPsh7YVvrDkVukiuPBovHlOMuOJMUR/UIg+SiuRTVweIaJgGSjk3Lqqjmm16cyT 6LCvlg1K0uYMjAmVpCXpqDxGJXAZ9xh+O7+cTyQxelR1Ukw6BdfkamQOGWJgxur+UY ndQP5jTxucMwVZo/W7v8LGzDAy2kzyfM9yQSb1Uc= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Jacob Moroni , Tatyana Nikolova , Leon Romanovsky , Sasha Levin Subject: [PATCH 6.17 686/849] RDMA/irdma: Set irdma_cq cq_num field during CQ create Date: Tue, 11 Nov 2025 09:44:16 +0900 Message-ID: <20251111004553.010703739@linuxfoundation.org> X-Mailer: git-send-email 2.51.2 In-Reply-To: <20251111004536.460310036@linuxfoundation.org> References: <20251111004536.460310036@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.17-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jacob Moroni [ Upstream commit 5575b7646b94c0afb0f4c0d86e00e13cf3397a62 ] The driver maintains a CQ table that is used to ensure that a CQ is still valid when processing CQ related AEs. When a CQ is destroyed, the table entry is cleared, using irdma_cq.cq_num as the index. This field was never being set, so it was just always clearing out entry 0. Additionally, the cq_num field size was increased to accommodate HW supporting more than 64K CQs. Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs") Signed-off-by: Jacob Moroni Link: https://patch.msgid.link/20250923142439.943930-1-jmoroni@google.com Acked-by: Tatyana Nikolova Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin --- drivers/infiniband/hw/irdma/verbs.c | 1 + drivers/infiniband/hw/irdma/verbs.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c index 105ffb1764b80..eb4683b248af9 100644 --- a/drivers/infiniband/hw/irdma/verbs.c +++ b/drivers/infiniband/hw/irdma/verbs.c @@ -2078,6 +2078,7 @@ static int irdma_create_cq(struct ib_cq *ibcq, spin_lock_init(&iwcq->lock); INIT_LIST_HEAD(&iwcq->resize_list); INIT_LIST_HEAD(&iwcq->cmpl_generated); + iwcq->cq_num = cq_num; info.dev = dev; ukinfo->cq_size = max(entries, 4); ukinfo->cq_id = cq_num; diff --git a/drivers/infiniband/hw/irdma/verbs.h b/drivers/infiniband/hw/irdma/verbs.h index 4381e5dbe782a..36ff8dd712f00 100644 --- a/drivers/infiniband/hw/irdma/verbs.h +++ b/drivers/infiniband/hw/irdma/verbs.h @@ -115,7 +115,7 @@ struct irdma_mr { struct irdma_cq { struct ib_cq ibcq; struct irdma_sc_cq sc_cq; - u16 cq_num; + u32 cq_num; bool user_mode; atomic_t armed; enum irdma_cmpl_notify last_notify; -- 2.51.0