net/mlx5e: Fix page allocation failure for ptp-RQ over SF
authorAya Levin <ayal@nvidia.com>
Tue, 22 Jun 2021 07:24:17 +0000 (10:24 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Tue, 27 Jul 2021 23:10:05 +0000 (16:10 -0700)
Set the correct pci-device pointer to the ptp-RQ. This allows access to
dma_mask and avoids allocation request with wrong pci-device.

Fixes: a099da8ffcf6 ("net/mlx5e: Add RQ to PTP channel")
Signed-off-by: Aya Levin <ayal@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en/ptp.c

index 07b429b..efef4ad 100644 (file)
@@ -497,7 +497,7 @@ static int mlx5e_init_ptp_rq(struct mlx5e_ptp *c, struct mlx5e_params *params,
        int err;
 
        rq->wq_type      = params->rq_wq_type;
-       rq->pdev         = mdev->device;
+       rq->pdev         = c->pdev;
        rq->netdev       = priv->netdev;
        rq->priv         = priv;
        rq->clock        = &mdev->clock;