netdevsim: convert driver to use unlocked devlink API during init/fini
authorJiri Pirko <jiri@nvidia.com>
Sat, 16 Jul 2022 11:02:40 +0000 (13:02 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 19 Jul 2022 03:10:48 +0000 (20:10 -0700)
commit012ec02ae4410207f796a9b280a60b80b6cc790a
tree1eef5b367c809deb578a70577225e226adde3b56
parenteb0e9fa2c6355e744d3ea7d07d34d89a4735320e
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>
drivers/net/netdevsim/bus.c
drivers/net/netdevsim/dev.c
drivers/net/netdevsim/fib.c
drivers/net/netdevsim/netdevsim.h
include/net/devlink.h
net/core/devlink.c