[net-next,2/2] nfp: devlink: set unknown fw_load_policy
diff mbox series

Message ID 20190911110833.9005-3-simon.horman@netronome.com
State Accepted
Delegated to: David Miller
Headers show
Series
  • devlink: add unknown 'fw_load_policy' value
Related show

Commit Message

Simon Horman Sept. 11, 2019, 11:08 a.m. UTC
From: Dirk van der Merwe <dirk.vandermerwe@netronome.com>

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>
---
 drivers/net/ethernet/netronome/nfp/devlink_param.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch
diff mbox series

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,