mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
devlink: make sure driver does not read updated driverinit param before reload
The driverinit param purpose is to serve the driver during init/reload time to provide a value, either default or set by user. Make sure that driver does not read value updated by user before the reload is performed. Hold the new value in a separate struct and switch it during reload. Note that this is required to be eventually possible to call devl_param_driverinit_value_get() without holding instance lock. Signed-off-by: Jiri Pirko <jiri@nvidia.com> Reviewed-by: Simon Horman <simon.horman@corigine.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
fa2f921f3b
commit
afd888c3e1
@@ -189,6 +189,9 @@ static inline bool devlink_reload_supported(const struct devlink_ops *ops)
|
||||
return ops->reload_down && ops->reload_up;
|
||||
}
|
||||
|
||||
/* Params */
|
||||
void devlink_params_driverinit_load_new(struct devlink *devlink);
|
||||
|
||||
/* Resources */
|
||||
struct devlink_resource;
|
||||
int devlink_resources_validate(struct devlink *devlink,
|
||||
|
||||
Reference in New Issue
Block a user