eth: fbnic: hwmon: Add completion infrastructure for firmware requests
authorSanman Pradhan <sanman.p211993@gmail.com>
Tue, 14 Jan 2025 00:07:03 +0000 (16:07 -0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 15 Jan 2025 22:14:11 +0000 (14:14 -0800)
commit378e5cc1c6c6fac10a1b7f16b8d8fe2283a61518
tree7cac8c19824639b7687aa205ad712afbc155be32
parent586b298d59e22f93313bfbfad1d071be660bc9f0
eth: fbnic: hwmon: Add completion infrastructure for firmware requests

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@gmail.com>
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Link: https://patch.msgid.link/20250114000705.2081288-2-sanman.p211993@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/meta/fbnic/fbnic.h
drivers/net/ethernet/meta/fbnic/fbnic_fw.c
drivers/net/ethernet/meta/fbnic/fbnic_fw.h