Skip to content

Commit

Permalink
nfp: devlink: set unknown fw_load_policy
Browse files Browse the repository at this point in the history
If the 'app_fw_from_flash' HWinfo key is invalid, set the
'fw_load_policy' devlink parameter value to unknown.

Suggested-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dirk van der Merwe authored and David S. Miller committed Sep 11, 2019
1 parent 64f658d commit 44798ec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/ethernet/netronome/nfp/devlink_param.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ static const struct nfp_devlink_param_u8_arg nfp_devlink_u8_args[] = {
[DEVLINK_PARAM_GENERIC_ID_FW_LOAD_POLICY] = {
.hwinfo_name = "app_fw_from_flash",
.default_hi_val = NFP_NSP_APP_FW_LOAD_DEFAULT,
.invalid_dl_val = -EINVAL,
.invalid_dl_val =
DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_UNKNOWN,
.hi_to_dl = {
[NFP_NSP_APP_FW_LOAD_DISK] =
DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_DISK,
Expand Down

0 comments on commit 44798ec

Please sign in to comment.