From: Simon Horman <horms@kernel.org>
To: Siva Reddy Kallam <siva.kallam@broadcom.com>
Cc: leonro@nvidia.com, jgg@nvidia.com, linux-rdma@vger.kernel.org,
netdev@vger.kernel.org, vikas.gupta@broadcom.com,
selvin.xavier@broadcom.com, anand.subramanian@broadcom.com,
Usman Ansari <usman.ansari@broadcom.com>
Subject: Re: [PATCH 5/8] RDMA/bng_re: Add infrastructure for enabling Firmware channel
Date: Fri, 12 Sep 2025 09:39:28 +0100 [thread overview]
Message-ID: <20250912083928.GS30363@horms.kernel.org> (raw)
In-Reply-To: <20250829123042.44459-6-siva.kallam@broadcom.com>
On Fri, Aug 29, 2025 at 12:30:39PM +0000, Siva Reddy Kallam wrote:
> Add infrastructure for enabling Firmware channel.
>
> Signed-off-by: Siva Reddy Kallam <siva.kallam@broadcom.com>
> Reviewed-by: Usman Ansari <usman.ansari@broadcom.com>
...
> diff --git a/drivers/infiniband/hw/bng_re/bng_fw.c b/drivers/infiniband/hw/bng_re/bng_fw.c
...
> +/* function events */
> +static int bng_re_process_func_event(struct bng_re_rcfw *rcfw,
> + struct creq_func_event *func_event)
> +{
> + int rc;
> +
> + switch (func_event->event) {
> + case CREQ_FUNC_EVENT_EVENT_TX_WQE_ERROR:
> + break;
> + case CREQ_FUNC_EVENT_EVENT_TX_DATA_ERROR:
> + break;
> + case CREQ_FUNC_EVENT_EVENT_RX_WQE_ERROR:
> + break;
> + case CREQ_FUNC_EVENT_EVENT_RX_DATA_ERROR:
> + break;
> + case CREQ_FUNC_EVENT_EVENT_CQ_ERROR:
> + break;
> + case CREQ_FUNC_EVENT_EVENT_TQM_ERROR:
> + break;
> + case CREQ_FUNC_EVENT_EVENT_CFCQ_ERROR:
> + break;
> + case CREQ_FUNC_EVENT_EVENT_CFCS_ERROR:
> + /* SRQ ctx error, call srq_handler??
> + * But there's no SRQ handle!
> + */
> + break;
> + case CREQ_FUNC_EVENT_EVENT_CFCC_ERROR:
> + break;
> + case CREQ_FUNC_EVENT_EVENT_CFCM_ERROR:
> + break;
> + case CREQ_FUNC_EVENT_EVENT_TIM_ERROR:
> + break;
> + case CREQ_FUNC_EVENT_EVENT_VF_COMM_REQUEST:
> + break;
> + case CREQ_FUNC_EVENT_EVENT_RESOURCE_EXHAUSTED:
> + break;
> + default:
> + return -EINVAL;
> + }
> +
> + return rc;
rc does not appear to be initialised in this function.
Flagged by Clang 20.1.8 with -Wuninitialized
> +}
...
> +int bng_re_enable_fw_channel(struct bng_re_rcfw *rcfw,
> + int msix_vector,
> + int cp_bar_reg_off)
> +{
> + struct bng_re_cmdq_ctx *cmdq;
> + struct bng_re_creq_ctx *creq;
> + int rc;
> +
> + cmdq = &rcfw->cmdq;
> + creq = &rcfw->creq;
Conversely, creq is initialised here but otherwise unused in this function.
Flagged by GCC 15.1.0 and Clang 20.1.8 with -Wunused-but-set-variable
> +
> + /* Assign defaults */
> + cmdq->seq_num = 0;
> + set_bit(FIRMWARE_FIRST_FLAG, &cmdq->flags);
> + init_waitqueue_head(&cmdq->waitq);
> +
> + rc = bng_re_map_cmdq_mbox(rcfw);
> + if (rc)
> + return rc;
> +
> + rc = bng_re_map_creq_db(rcfw, cp_bar_reg_off);
> + if (rc)
> + return rc;
> +
> + rc = bng_re_rcfw_start_irq(rcfw, msix_vector, true);
> + if (rc) {
> + dev_err(&rcfw->pdev->dev,
> + "Failed to request IRQ for CREQ rc = 0x%x\n", rc);
> + bng_re_disable_rcfw_channel(rcfw);
> + return rc;
> + }
> +
> + return 0;
> +}
...
next prev parent reply other threads:[~2025-09-12 8:39 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-29 12:30 [PATCH 0/8] Introducing Broadcom BNG_RE RoCE Driver Siva Reddy Kallam
2025-08-29 12:30 ` [PATCH 1/8] bng_en: Add RoCE aux device support Siva Reddy Kallam
2025-09-01 19:10 ` Jakub Kicinski
2025-08-29 12:30 ` [PATCH 2/8] RDMA/bng_re: Add Auxiliary interface Siva Reddy Kallam
2025-09-16 12:34 ` Simon Horman
2025-09-17 9:17 ` Siva Reddy Kallam
2025-08-29 12:30 ` [PATCH 3/8] RDMA/bng_re: Register and get the resources from bnge driver Siva Reddy Kallam
2025-08-29 12:30 ` [PATCH 4/8] RDMA/bng_re: Allocate required memory resources for Firmware channel Siva Reddy Kallam
2025-08-29 12:30 ` [PATCH 5/8] RDMA/bng_re: Add infrastructure for enabling " Siva Reddy Kallam
2025-09-12 8:39 ` Simon Horman [this message]
2025-09-15 8:44 ` Siva Reddy Kallam
2025-09-15 9:00 ` Leon Romanovsky
2025-09-15 10:09 ` Siva Reddy Kallam
2025-08-29 12:30 ` [PATCH 6/8] RDMA/bng_re: Enable Firmware channel and query device attributes Siva Reddy Kallam
2025-09-12 8:42 ` Simon Horman
2025-09-15 8:46 ` Siva Reddy Kallam
2025-08-29 12:30 ` [PATCH 7/8] RDMA/bng_re: Add basic debugfs infrastructure Siva Reddy Kallam
2025-08-29 12:30 ` [PATCH 8/8] RDMA/bng_re: Initialize the Firmware and Hardware Siva Reddy Kallam
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250912083928.GS30363@horms.kernel.org \
--to=horms@kernel.org \
--cc=anand.subramanian@broadcom.com \
--cc=jgg@nvidia.com \
--cc=leonro@nvidia.com \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=selvin.xavier@broadcom.com \
--cc=siva.kallam@broadcom.com \
--cc=usman.ansari@broadcom.com \
--cc=vikas.gupta@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).