@@ -137,3 +137,7 @@ own name.
* - ``event_eq_size``
- u32
- Control the size of asynchronous control events EQ.
+ * - ``fw_bank``
+ - u8
+ - Select the bank of firmware to be used on future boot and/or resets in
+ devices that have multiple firmware memory banks.
@@ -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, \
@@ -5221,6 +5221,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)
Add a new device generic parameter to select the bank of firmware to be used on future boot and/or resets in those devices that have multiple firmware memory banks. This can be used along with the FW_LOAD_POLICY parameter, depending on the capabilities of the particular device. Examples: $ devlink dev param set pci/0000:07:00.0 name fw_bank value 1 cmode permanent $ devlink dev param show pci/0000:07:00.0 name fw_bank pci/0000:07:00.0: name fw_bank type generic values: cmode permanent value 1 Link: 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(+)