mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 23:03:57 -04:00
netdevsim: Disable VFs on nsim_dev_reload_destroy() call
Move VFs disabling from device release() to nsim_dev_reload_destroy() to make VFs disabling and ports removal simultaneous. This is a requirement for VFs ports implemented in next patches. Signed-off-by: Dmytro Linkin <dlinkin@nvidia.com> Reviewed-by: Jiri Pirko <jiri@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
d395381909
commit
32ac15d8fd
@@ -1182,6 +1182,12 @@ static void nsim_dev_reload_destroy(struct nsim_dev *nsim_dev)
|
||||
if (devlink_is_reload_failed(devlink))
|
||||
return;
|
||||
debugfs_remove(nsim_dev->take_snapshot);
|
||||
|
||||
mutex_lock(&nsim_dev->nsim_bus_dev->vfs_lock);
|
||||
if (nsim_dev->nsim_bus_dev->num_vfs)
|
||||
nsim_bus_dev_vfs_disable(nsim_dev->nsim_bus_dev);
|
||||
mutex_unlock(&nsim_dev->nsim_bus_dev->vfs_lock);
|
||||
|
||||
nsim_dev_port_del_all(nsim_dev);
|
||||
nsim_dev_psample_exit(nsim_dev);
|
||||
nsim_dev_health_exit(nsim_dev);
|
||||
|
||||
Reference in New Issue
Block a user