OSDN Git Service

devlink: add unknown 'fw_load_policy' value
authorDirk van der Merwe <dirk.vandermerwe@netronome.com>
Wed, 11 Sep 2019 11:08:32 +0000 (12:08 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Sep 2019 14:10:05 +0000 (15:10 +0100)
Similar to the 'reset_dev_on_drv_probe' devlink parameter, it is useful
to have an unknown value which can be used by drivers to report that the
hardware value isn't recognized or is otherwise invalid instead of
failing the operation.

This is especially useful for u8/enum parameters.

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>
include/uapi/linux/devlink.h

index 1da3e83..8da5365 100644 (file)
@@ -203,6 +203,7 @@ enum devlink_param_fw_load_policy_value {
        DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_DRIVER,
        DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_FLASH,
        DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_DISK,
+       DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_UNKNOWN,
 };
 
 enum devlink_param_reset_dev_on_drv_probe_value {