Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH net] net/mlx5: Remove all auxiliary devices at the unregister event
@ 2021-08-21 12:05 Leon Romanovsky
2021-08-25 9:01 ` Leon Romanovsky
0 siblings, 1 reply; 4+ messages in thread
From: Leon Romanovsky @ 2021-08-21 12:05 UTC (permalink / raw)
To: Jakub Kicinski, Saeed Mahameed, David S . Miller
Cc: Leon Romanovsky, Dmytro Linkin, netdev, Roi Dayan, Yicong Yang
From: Leon Romanovsky <leonro@nvidia.com>
The call to mlx5_unregister_device() means that mlx5_core driver is
removed. In such scenario, we need to disregard all other flags like
attach/detach and forcibly remove all auxiliary devices.
Fixes: a5ae8fc9058e ("net/mlx5e: Don't create devices during unload flow")
Tested-and-Reported-by: Yicong Yang <yangyicong@hisilicon.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
drivers/net/ethernet/mellanox/mlx5/core/dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/dev.c b/drivers/net/ethernet/mellanox/mlx5/core/dev.c
index ff6b03dc7e32..e8093c4e09d4 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/dev.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/dev.c
@@ -450,7 +450,7 @@ int mlx5_register_device(struct mlx5_core_dev *dev)
void mlx5_unregister_device(struct mlx5_core_dev *dev)
{
mutex_lock(&mlx5_intf_mutex);
- dev->priv.flags |= MLX5_PRIV_FLAGS_DISABLE_ALL_ADEV;
+ dev->priv.flags = MLX5_PRIV_FLAGS_DISABLE_ALL_ADEV;
mlx5_rescan_drivers_locked(dev);
mutex_unlock(&mlx5_intf_mutex);
}
--
2.31.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] net/mlx5: Remove all auxiliary devices at the unregister event
2021-08-21 12:05 [PATCH net] net/mlx5: Remove all auxiliary devices at the unregister event Leon Romanovsky
@ 2021-08-25 9:01 ` Leon Romanovsky
2021-08-25 14:18 ` Jakub Kicinski
0 siblings, 1 reply; 4+ messages in thread
From: Leon Romanovsky @ 2021-08-25 9:01 UTC (permalink / raw)
To: Jakub Kicinski, Saeed Mahameed, David S . Miller
Cc: Dmytro Linkin, netdev, Roi Dayan, Yicong Yang
On Sat, Aug 21, 2021 at 03:05:11PM +0300, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@nvidia.com>
>
> The call to mlx5_unregister_device() means that mlx5_core driver is
> removed. In such scenario, we need to disregard all other flags like
> attach/detach and forcibly remove all auxiliary devices.
>
> Fixes: a5ae8fc9058e ("net/mlx5e: Don't create devices during unload flow")
> Tested-and-Reported-by: Yicong Yang <yangyicong@hisilicon.com>
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
> ---
> drivers/net/ethernet/mellanox/mlx5/core/dev.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Any reason do not apply this patch?
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/dev.c b/drivers/net/ethernet/mellanox/mlx5/core/dev.c
> index ff6b03dc7e32..e8093c4e09d4 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/dev.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/dev.c
> @@ -450,7 +450,7 @@ int mlx5_register_device(struct mlx5_core_dev *dev)
> void mlx5_unregister_device(struct mlx5_core_dev *dev)
> {
> mutex_lock(&mlx5_intf_mutex);
> - dev->priv.flags |= MLX5_PRIV_FLAGS_DISABLE_ALL_ADEV;
> + dev->priv.flags = MLX5_PRIV_FLAGS_DISABLE_ALL_ADEV;
> mlx5_rescan_drivers_locked(dev);
> mutex_unlock(&mlx5_intf_mutex);
> }
> --
> 2.31.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] net/mlx5: Remove all auxiliary devices at the unregister event
2021-08-25 9:01 ` Leon Romanovsky
@ 2021-08-25 14:18 ` Jakub Kicinski
2021-08-26 17:14 ` Saeed Mahameed
0 siblings, 1 reply; 4+ messages in thread
From: Jakub Kicinski @ 2021-08-25 14:18 UTC (permalink / raw)
To: Leon Romanovsky
Cc: Saeed Mahameed, David S . Miller, Dmytro Linkin, netdev,
Roi Dayan, Yicong Yang
On Wed, 25 Aug 2021 12:01:22 +0300 Leon Romanovsky wrote:
> On Sat, Aug 21, 2021 at 03:05:11PM +0300, Leon Romanovsky wrote:
> > From: Leon Romanovsky <leonro@nvidia.com>
> >
> > The call to mlx5_unregister_device() means that mlx5_core driver is
> > removed. In such scenario, we need to disregard all other flags like
> > attach/detach and forcibly remove all auxiliary devices.
> >
> > Fixes: a5ae8fc9058e ("net/mlx5e: Don't create devices during unload flow")
> > Tested-and-Reported-by: Yicong Yang <yangyicong@hisilicon.com>
> > Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
> > ---
> > drivers/net/ethernet/mellanox/mlx5/core/dev.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Any reason do not apply this patch?
'Awaiting upstream' => we expect Saeed to take it via his tree.
If special handling is requested is should be noted somewhere.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] net/mlx5: Remove all auxiliary devices at the unregister event
2021-08-25 14:18 ` Jakub Kicinski
@ 2021-08-26 17:14 ` Saeed Mahameed
0 siblings, 0 replies; 4+ messages in thread
From: Saeed Mahameed @ 2021-08-26 17:14 UTC (permalink / raw)
To: Leon Romanovsky, kuba; +Cc: Roi Dayan, yangyicong, davem, Dmytro Linkin, netdev
On Wed, 2021-08-25 at 07:18 -0700, Jakub Kicinski wrote:
> On Wed, 25 Aug 2021 12:01:22 +0300 Leon Romanovsky wrote:
> > On Sat, Aug 21, 2021 at 03:05:11PM +0300, Leon Romanovsky wrote:
> > > From: Leon Romanovsky <leonro@nvidia.com>
> > >
> > > The call to mlx5_unregister_device() means that mlx5_core driver
> > > is
> > > removed. In such scenario, we need to disregard all other flags
> > > like
> > > attach/detach and forcibly remove all auxiliary devices.
> > >
> > > Fixes: a5ae8fc9058e ("net/mlx5e: Don't create devices during
> > > unload flow")
> > > Tested-and-Reported-by: Yicong Yang <yangyicong@hisilicon.com>
> > > Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
> > > ---
> > > drivers/net/ethernet/mellanox/mlx5/core/dev.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > Any reason do not apply this patch?
>
> 'Awaiting upstream' => we expect Saeed to take it via his tree.
> If special handling is requested is should be noted somewhere.
Planned for submission in my next pr.
I don't send net prs until i have enough content, to avoid spamming the
mailing list :).
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-08-26 17:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-21 12:05 [PATCH net] net/mlx5: Remove all auxiliary devices at the unregister event Leon Romanovsky
2021-08-25 9:01 ` Leon Romanovsky
2021-08-25 14:18 ` Jakub Kicinski
2021-08-26 17:14 ` Saeed Mahameed
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).