devlink: Add support for 'fw_load_policy' generic parameter
Add string to uint conversion for 'fw_load_policy' generic parameter. Signed-off-by: Shalom Toledo <shalomt@mellanox.com> Reviewed-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David Ahern <dsahern@gmail.com>
This commit is contained in:
parent
2557dca2b0
commit
a463fd4fa4
|
|
@ -1972,7 +1972,18 @@ param_val_conv_str_get(const struct param_val_conv *param_val_conv,
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct param_val_conv param_val_conv[] = {};
|
static const struct param_val_conv param_val_conv[] = {
|
||||||
|
{
|
||||||
|
.name = "fw_load_policy",
|
||||||
|
.vstr = "driver",
|
||||||
|
.vuint = DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_DRIVER,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.name = "fw_load_policy",
|
||||||
|
.vstr = "flash",
|
||||||
|
.vuint = DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_FLASH,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
#define PARAM_VAL_CONV_LEN ARRAY_SIZE(param_val_conv)
|
#define PARAM_VAL_CONV_LEN ARRAY_SIZE(param_val_conv)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -163,6 +163,11 @@ enum devlink_param_cmode {
|
||||||
DEVLINK_PARAM_CMODE_MAX = __DEVLINK_PARAM_CMODE_MAX - 1
|
DEVLINK_PARAM_CMODE_MAX = __DEVLINK_PARAM_CMODE_MAX - 1
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum devlink_param_fw_load_policy_value {
|
||||||
|
DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_DRIVER,
|
||||||
|
DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_FLASH,
|
||||||
|
};
|
||||||
|
|
||||||
enum devlink_attr {
|
enum devlink_attr {
|
||||||
/* don't change the order or add anything between, this is ABI! */
|
/* don't change the order or add anything between, this is ABI! */
|
||||||
DEVLINK_ATTR_UNSPEC,
|
DEVLINK_ATTR_UNSPEC,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue