netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leon Romanovsky <leonro@nvidia.com>
To: Jakub Kicinski <kuba@kernel.org>,
	Saeed Mahameed <saeedm@nvidia.com>,
	"David S . Miller" <davem@davemloft.net>
Cc: Dmytro Linkin <dlinkin@nvidia.com>, <netdev@vger.kernel.org>,
	Roi Dayan <roid@nvidia.com>,
	Yicong Yang <yangyicong@hisilicon.com>
Subject: Re: [PATCH net] net/mlx5: Remove all auxiliary devices at the unregister event
Date: Wed, 25 Aug 2021 12:01:22 +0300	[thread overview]
Message-ID: <YSYG4it61d7ztmuq@unreal> (raw)
In-Reply-To: <10641ab4c3de708f61a968158cac7620cef27067.1629547326.git.leonro@nvidia.com>

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
> 

  reply	other threads:[~2021-08-25  9:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2021-08-25 14:18   ` Jakub Kicinski
2021-08-26 17:14     ` Saeed Mahameed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YSYG4it61d7ztmuq@unreal \
    --to=leonro@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=dlinkin@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=roid@nvidia.com \
    --cc=saeedm@nvidia.com \
    --cc=yangyicong@hisilicon.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).