diff options
author | Jiri Pirko <jiri@nvidia.com> | 2022-07-16 13:02:40 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-07-18 20:10:48 -0700 |
commit | 012ec02ae4410207f796a9b280a60b80b6cc790a (patch) | |
tree | 1eef5b367c809deb578a70577225e226adde3b56 /include/net/devlink.h | |
parent | eb0e9fa2c6355e744d3ea7d07d34d89a4735320e (diff) | |
download | lwn-012ec02ae4410207f796a9b280a60b80b6cc790a.tar.gz lwn-012ec02ae4410207f796a9b280a60b80b6cc790a.zip |
netdevsim: convert driver to use unlocked devlink API during init/fini
Prepare for devlink reload being called with devlink->lock held and
convert the netdevsim driver to use unlocked devlink API during init and
fini flows. Take devl_lock() in reload_down() and reload_up() ops in the
meantime before reload cmd is converted to take the lock itself.
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net/devlink.h')
-rw-r--r-- | include/net/devlink.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/devlink.h b/include/net/devlink.h index 391d401ddb55..242798967a44 100644 --- a/include/net/devlink.h +++ b/include/net/devlink.h @@ -1517,6 +1517,7 @@ struct device *devlink_to_dev(const struct devlink *devlink); /* Devlink instance explicit locking */ void devl_lock(struct devlink *devlink); +int devl_trylock(struct devlink *devlink); void devl_unlock(struct devlink *devlink); void devl_assert_locked(struct devlink *devlink); bool devl_lock_is_held(struct devlink *devlink); |