From: Eli Cohen <hidden> Date: 2021-02-16 05:51:34
struct mlx5_vdpa_net pointer was stored in drvdata. Extract it as well
in mlx5v_remove().
Fixes: 74c9729dd892 ("vdpa/mlx5: Connect mlx5_vdpa to auxiliary bus")
Signed-off-by: Eli Cohen <redacted>
---
drivers/vdpa/mlx5/net/mlx5_vnet.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
From: Eli Cohen <hidden> Date: 2021-02-16 05:52:11
struct mlx5_vdpa_net pointer was stored in drvdata. Extract it as well
in mlx5v_remove().
Fixes: 74c9729dd892 ("vdpa/mlx5: Connect mlx5_vdpa to auxiliary bus")
Signed-off-by: Eli Cohen <redacted>
---
drivers/vdpa/mlx5/net/mlx5_vnet.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
From: Leon Romanovsky <leon@kernel.org> Date: 2021-02-16 06:37:05
On Tue, Feb 16, 2021 at 07:50:22AM +0200, Eli Cohen wrote:
quoted hunk
struct mlx5_vdpa_net pointer was stored in drvdata. Extract it as well
in mlx5v_remove().
Fixes: 74c9729dd892 ("vdpa/mlx5: Connect mlx5_vdpa to auxiliary bus")
Signed-off-by: Eli Cohen <redacted>
---
drivers/vdpa/mlx5/net/mlx5_vnet.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
From: Eli Cohen <hidden> Date: 2021-02-16 06:43:31
On Tue, Feb 16, 2021 at 08:35:51AM +0200, Leon Romanovsky wrote:
On Tue, Feb 16, 2021 at 07:50:22AM +0200, Eli Cohen wrote:
quoted
struct mlx5_vdpa_net pointer was stored in drvdata. Extract it as well
in mlx5v_remove().
Fixes: 74c9729dd892 ("vdpa/mlx5: Connect mlx5_vdpa to auxiliary bus")
Signed-off-by: Eli Cohen <redacted>
---
drivers/vdpa/mlx5/net/mlx5_vnet.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
From: Leon Romanovsky <leon@kernel.org> Date: 2021-02-16 07:38:26
On Tue, Feb 16, 2021 at 08:42:26AM +0200, Eli Cohen wrote:
On Tue, Feb 16, 2021 at 08:35:51AM +0200, Leon Romanovsky wrote:
quoted
On Tue, Feb 16, 2021 at 07:50:22AM +0200, Eli Cohen wrote:
quoted
struct mlx5_vdpa_net pointer was stored in drvdata. Extract it as well
in mlx5v_remove().
Fixes: 74c9729dd892 ("vdpa/mlx5: Connect mlx5_vdpa to auxiliary bus")
Signed-off-by: Eli Cohen <redacted>
---
drivers/vdpa/mlx5/net/mlx5_vnet.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
@@ -2036,9 +2036,9 @@ static int mlx5v_probe(struct auxiliary_device *adev,staticvoidmlx5v_remove(structauxiliary_device*adev){-structmlx5_vdpa_dev*mvdev=dev_get_drvdata(&adev->dev);+structmlx5_vdpa_net*ndev=dev_get_drvdata(&adev->dev);-vdpa_unregister_device(&mvdev->vdev);+vdpa_unregister_device(&ndev->mvdev.vdev);}
IMHO, The more correct solution is to fix dev_set_drvdata() call,
because we are regustering/unregistering/allocating "struct mlx5_vdpa_dev".
We're allocating "struct mlx5_vdpa_net". "struct mlx5_vdpa_dev" is just
a member field of "struct mlx5_vdpa_net".
I referred to these lines in the mlx5v_probe():
1986 err = mlx5_vdpa_alloc_resources(&ndev->mvdev);
1987 if (err)
1988 goto err_mtu;
1989
1990 err = alloc_resources(ndev);
1991 if (err)
1992 goto err_res;
1993
1994 err = vdpa_register_device(&mvdev->vdev);
So mlx5v_remove() is better to be symmetrical.
Thanks
From: Eli Cohen <hidden> Date: 2021-02-16 12:46:50
On Tue, Feb 16, 2021 at 09:37:34AM +0200, Leon Romanovsky wrote:
On Tue, Feb 16, 2021 at 08:42:26AM +0200, Eli Cohen wrote:
quoted
On Tue, Feb 16, 2021 at 08:35:51AM +0200, Leon Romanovsky wrote:
quoted
On Tue, Feb 16, 2021 at 07:50:22AM +0200, Eli Cohen wrote:
quoted
struct mlx5_vdpa_net pointer was stored in drvdata. Extract it as well
in mlx5v_remove().
Fixes: 74c9729dd892 ("vdpa/mlx5: Connect mlx5_vdpa to auxiliary bus")
Signed-off-by: Eli Cohen <redacted>
---
drivers/vdpa/mlx5/net/mlx5_vnet.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
@@ -2036,9 +2036,9 @@ static int mlx5v_probe(struct auxiliary_device *adev,staticvoidmlx5v_remove(structauxiliary_device*adev){-structmlx5_vdpa_dev*mvdev=dev_get_drvdata(&adev->dev);+structmlx5_vdpa_net*ndev=dev_get_drvdata(&adev->dev);-vdpa_unregister_device(&mvdev->vdev);+vdpa_unregister_device(&ndev->mvdev.vdev);}
IMHO, The more correct solution is to fix dev_set_drvdata() call,
because we are regustering/unregistering/allocating "struct mlx5_vdpa_dev".
We're allocating "struct mlx5_vdpa_net". "struct mlx5_vdpa_dev" is just
a member field of "struct mlx5_vdpa_net".
I referred to these lines in the mlx5v_probe():
1986 err = mlx5_vdpa_alloc_resources(&ndev->mvdev);
1987 if (err)
1988 goto err_mtu;
1989
1990 err = alloc_resources(ndev);
1991 if (err)
1992 goto err_res;
1993
1994 err = vdpa_register_device(&mvdev->vdev);
So mlx5v_remove() is better to be symmetrical.
It's "struct mlx5_vdpa_net" that is being allocated here so it makes
sense to set this pointer as the the driver data.
From: Leon Romanovsky <leon@kernel.org> Date: 2021-02-16 13:18:48
On Tue, Feb 16, 2021 at 02:45:40PM +0200, Eli Cohen wrote:
On Tue, Feb 16, 2021 at 09:37:34AM +0200, Leon Romanovsky wrote:
quoted
On Tue, Feb 16, 2021 at 08:42:26AM +0200, Eli Cohen wrote:
quoted
On Tue, Feb 16, 2021 at 08:35:51AM +0200, Leon Romanovsky wrote:
quoted
On Tue, Feb 16, 2021 at 07:50:22AM +0200, Eli Cohen wrote:
quoted
struct mlx5_vdpa_net pointer was stored in drvdata. Extract it as well
in mlx5v_remove().
Fixes: 74c9729dd892 ("vdpa/mlx5: Connect mlx5_vdpa to auxiliary bus")
Signed-off-by: Eli Cohen <redacted>
---
drivers/vdpa/mlx5/net/mlx5_vnet.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
@@ -2036,9 +2036,9 @@ static int mlx5v_probe(struct auxiliary_device *adev,staticvoidmlx5v_remove(structauxiliary_device*adev){-structmlx5_vdpa_dev*mvdev=dev_get_drvdata(&adev->dev);+structmlx5_vdpa_net*ndev=dev_get_drvdata(&adev->dev);-vdpa_unregister_device(&mvdev->vdev);+vdpa_unregister_device(&ndev->mvdev.vdev);}
IMHO, The more correct solution is to fix dev_set_drvdata() call,
because we are regustering/unregistering/allocating "struct mlx5_vdpa_dev".
We're allocating "struct mlx5_vdpa_net". "struct mlx5_vdpa_dev" is just
a member field of "struct mlx5_vdpa_net".
I referred to these lines in the mlx5v_probe():
1986 err = mlx5_vdpa_alloc_resources(&ndev->mvdev);
1987 if (err)
1988 goto err_mtu;
1989
1990 err = alloc_resources(ndev);
1991 if (err)
1992 goto err_res;
1993
1994 err = vdpa_register_device(&mvdev->vdev);
So mlx5v_remove() is better to be symmetrical.
It's "struct mlx5_vdpa_net" that is being allocated here so it makes
sense to set this pointer as the the driver data.
Anyway, it doesn't important.
Thanks, for the original patch.
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
From: "Michael S. Tsirkin" <mst@redhat.com> Date: 2021-02-23 12:35:28
On Tue, Feb 16, 2021 at 07:50:21AM +0200, Eli Cohen wrote:
struct mlx5_vdpa_net pointer was stored in drvdata. Extract it as well
in mlx5v_remove().
Fixes: 74c9729dd892 ("vdpa/mlx5: Connect mlx5_vdpa to auxiliary bus")
Signed-off-by: Eli Cohen <redacted>
From: Eli Cohen <hidden> Date: 2021-02-23 12:44:27
On Tue, Feb 23, 2021 at 07:32:49AM -0500, Michael S. Tsirkin wrote:
On Tue, Feb 16, 2021 at 07:50:21AM +0200, Eli Cohen wrote:
quoted
struct mlx5_vdpa_net pointer was stored in drvdata. Extract it as well
in mlx5v_remove().
Fixes: 74c9729dd892 ("vdpa/mlx5: Connect mlx5_vdpa to auxiliary bus")
Signed-off-by: Eli Cohen <redacted>
Sorry which tree this is for? Couldn't apply.
Drop it. The patch that adds support for management bus implicitly
addresses the issue.