From: Jiri Pirko <jiri@resnulli.us>
To: Shannon Nelson <shannon.nelson@amd.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org,
jiri@nvidia.com
Subject: Re: [PATCH net-next 1/2] devlink: add fw bank select parameter
Date: Tue, 6 Dec 2022 10:07:19 +0100 [thread overview]
Message-ID: <Y48GR+NShwJiIBTc@nanopsycho> (raw)
In-Reply-To: <20221205172627.44943-2-shannon.nelson@amd.com>
Mon, Dec 05, 2022 at 06:26:26PM CET, shannon.nelson@amd.com wrote:
>Some devices have multiple memory banks that can be used to
>hold various firmware versions that can be chosen for booting.
>This can be used in addition to or along with the FW_LOAD_POLICY
>parameter, depending on the capabilities of the particular
>device.
>
>This is a parameter suggested by Jake in
>https://lore.kernel.org/netdev/CO1PR11MB508942BE965E63893DE9B86AD6129@CO1PR11MB5089.namprd11.prod.outlook.com/
>
>Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>
>---
> Documentation/networking/devlink/devlink-params.rst | 4 ++++
> include/net/devlink.h | 4 ++++
> net/core/devlink.c | 5 +++++
> 3 files changed, 13 insertions(+)
>
>diff --git a/Documentation/networking/devlink/devlink-params.rst b/Documentation/networking/devlink/devlink-params.rst
>index 4e01dc32bc08..ed62c8a92f17 100644
>--- a/Documentation/networking/devlink/devlink-params.rst
>+++ b/Documentation/networking/devlink/devlink-params.rst
>@@ -137,3 +137,7 @@ own name.
> * - ``event_eq_size``
> - u32
> - Control the size of asynchronous control events EQ.
>+ * - ``fw_bank``
>+ - u8
>+ - In a multi-bank flash device, select the FW memory bank to be
>+ loaded from on the next device boot/reset.
Just the next one or any in the future? Please define this precisely.
>diff --git a/include/net/devlink.h b/include/net/devlink.h
>index 074a79b8933f..8a1430196980 100644
>--- a/include/net/devlink.h
>+++ b/include/net/devlink.h
>@@ -510,6 +510,7 @@ enum devlink_param_generic_id {
> DEVLINK_PARAM_GENERIC_ID_ENABLE_IWARP,
> DEVLINK_PARAM_GENERIC_ID_IO_EQ_SIZE,
> DEVLINK_PARAM_GENERIC_ID_EVENT_EQ_SIZE,
>+ DEVLINK_PARAM_GENERIC_ID_FW_BANK,
>
> /* add new param generic ids above here*/
> __DEVLINK_PARAM_GENERIC_ID_MAX,
>@@ -568,6 +569,9 @@ enum devlink_param_generic_id {
> #define DEVLINK_PARAM_GENERIC_EVENT_EQ_SIZE_NAME "event_eq_size"
> #define DEVLINK_PARAM_GENERIC_EVENT_EQ_SIZE_TYPE DEVLINK_PARAM_TYPE_U32
>
>+#define DEVLINK_PARAM_GENERIC_FW_BANK_NAME "fw_bank"
>+#define DEVLINK_PARAM_GENERIC_FW_BANK_TYPE DEVLINK_PARAM_TYPE_U8
>+
> #define DEVLINK_PARAM_GENERIC(_id, _cmodes, _get, _set, _validate) \
> { \
> .id = DEVLINK_PARAM_GENERIC_ID_##_id, \
>diff --git a/net/core/devlink.c b/net/core/devlink.c
>index 0e10a8a68c5e..6872d678be5b 100644
>--- a/net/core/devlink.c
>+++ b/net/core/devlink.c
>@@ -5231,6 +5231,11 @@ static const struct devlink_param devlink_param_generic[] = {
> .name = DEVLINK_PARAM_GENERIC_EVENT_EQ_SIZE_NAME,
> .type = DEVLINK_PARAM_GENERIC_EVENT_EQ_SIZE_TYPE,
> },
>+ {
>+ .id = DEVLINK_PARAM_GENERIC_ID_FW_BANK,
>+ .name = DEVLINK_PARAM_GENERIC_FW_BANK_NAME,
>+ .type = DEVLINK_PARAM_GENERIC_FW_BANK_TYPE,
>+ },
> };
>
> static int devlink_param_generic_verify(const struct devlink_param *param)
>--
>2.17.1
>
next prev parent reply other threads:[~2022-12-06 9:07 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-05 17:26 [PATCH net-next 0/2] devlink: add params FW_BANK and ENABLE_MIGRATION Shannon Nelson
2022-12-05 17:26 ` [PATCH net-next 1/2] devlink: add fw bank select parameter Shannon Nelson
2022-12-06 9:07 ` Jiri Pirko [this message]
2022-12-06 18:18 ` Shannon Nelson
2022-12-07 13:34 ` Jiri Pirko
2022-12-07 1:41 ` Jakub Kicinski
2022-12-07 19:29 ` Shannon Nelson
2022-12-08 0:36 ` Jakub Kicinski
2022-12-08 18:44 ` Shannon Nelson
2022-12-09 0:47 ` Jacob Keller
2022-12-09 1:24 ` Jakub Kicinski
2022-12-12 18:04 ` Jacob Keller
2022-12-12 18:34 ` Jakub Kicinski
2022-12-09 1:15 ` Jakub Kicinski
2022-12-05 17:26 ` [PATCH net-next 2/2] devlink: add enable_migration parameter Shannon Nelson
2022-12-06 9:04 ` Jiri Pirko
2022-12-06 18:28 ` Shannon Nelson
2022-12-07 13:33 ` Jiri Pirko
2022-12-05 18:22 ` [PATCH net-next 0/2] devlink: add params FW_BANK and ENABLE_MIGRATION Leon Romanovsky
2022-12-05 18:55 ` Shannon Nelson
2022-12-06 8:13 ` Leon Romanovsky
2022-12-06 9:00 ` Jiri Pirko
2022-12-06 18:21 ` Shannon Nelson
2022-12-07 13:32 ` Jiri Pirko
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=Y48GR+NShwJiIBTc@nanopsycho \
--to=jiri@resnulli.us \
--cc=davem@davemloft.net \
--cc=jiri@nvidia.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=shannon.nelson@amd.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