diff options
author | Dirk van der Merwe <dirk.vandermerwe@netronome.com> | 2019-09-11 12:08:33 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-09-11 15:10:05 +0100 |
commit | 44798eceea87376c043e6cf068f5049ea7b572a2 (patch) | |
tree | 0ffcc3b3519dd32ae2f8f08349c6f4e8712ce828 | |
parent | 64f658ded48eccd23d429d636d49a03b3f53d741 (diff) | |
download | linux-44798eceea87376c043e6cf068f5049ea7b572a2.tar.bz2 |
nfp: devlink: set unknown fw_load_policy
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>
-rw-r--r-- | drivers/net/ethernet/netronome/nfp/devlink_param.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/devlink_param.c b/drivers/net/ethernet/netronome/nfp/devlink_param.c index 4a8141b4d625..36491835ac65 100644 --- a/drivers/net/ethernet/netronome/nfp/devlink_param.c +++ b/drivers/net/ethernet/netronome/nfp/devlink_param.c @@ -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, |