[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z4YgpZ+QgV6w7BYR@mev-dev.igk.intel.com>
Date: Tue, 14 Jan 2025 09:30:29 +0100
From: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>
To: Sanman Pradhan <sanman.p211993@...il.com>
Cc: netdev@...r.kernel.org, alexanderduyck@...com, kuba@...nel.org,
kernel-team@...a.com, andrew+netdev@...n.ch, davem@...emloft.net,
edumazet@...gle.com, pabeni@...hat.com,
kalesh-anakkur.purayil@...adcom.com, linux@...ck-us.net,
mohsin.bashr@...il.com, jdelvare@...e.com, horms@...nel.org,
suhui@...china.com, linux-kernel@...r.kernel.org,
vadim.fedorenko@...ux.dev, linux-hwmon@...r.kernel.org,
sanmanpradhan@...a.com
Subject: Re: [PATCH net-next 1/3] eth: fbnic: hwmon: Add completion
infrastructure for firmware requests
On Mon, Jan 13, 2025 at 04:07:03PM -0800, Sanman Pradhan wrote:
> Add infrastructure to support firmware request/response handling with
> completions. Add a completion structure to track message state including
> message type for matching, completion for waiting for response, and
> result for error propagation. Use existing spinlock to protect the writes.
> The data from the various response types will be added to the "union u"
> by subsequent commits.
>
> Signed-off-by: Sanman Pradhan <sanman.p211993@...il.com>
> ---
> drivers/net/ethernet/meta/fbnic/fbnic.h | 1 +
> drivers/net/ethernet/meta/fbnic/fbnic_fw.c | 79 ++++++++++++++++++++++
> drivers/net/ethernet/meta/fbnic/fbnic_fw.h | 13 ++++
> 3 files changed, 93 insertions(+)
>
> diff --git a/drivers/net/ethernet/meta/fbnic/fbnic.h b/drivers/net/ethernet/meta/fbnic/fbnic.h
> index 50f97f5399ff..ad8ac5ac7be9 100644
> --- a/drivers/net/ethernet/meta/fbnic/fbnic.h
> +++ b/drivers/net/ethernet/meta/fbnic/fbnic.h
> @@ -41,6 +41,7 @@ struct fbnic_dev {
>
> struct fbnic_fw_mbx mbx[FBNIC_IPC_MBX_INDICES];
> struct fbnic_fw_cap fw_cap;
> + struct fbnic_fw_completion *cmpl_data;
> /* Lock protecting Tx Mailbox queue to prevent possible races */
> spinlock_t fw_tx_lock;
>
> diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_fw.c b/drivers/net/ethernet/meta/fbnic/fbnic_fw.c
> index 8f7a2a19ddf8..320615a122e4 100644
> --- a/drivers/net/ethernet/meta/fbnic/fbnic_fw.c
> +++ b/drivers/net/ethernet/meta/fbnic/fbnic_fw.c
> @@ -228,6 +228,63 @@ static void fbnic_mbx_process_tx_msgs(struct fbnic_dev *fbd)
> tx_mbx->head = head;
> }
>
[...]
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>
> --
> 2.43.5
Powered by blists - more mailing lists