All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: "David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>
Cc: Leon Romanovsky <leonro@nvidia.com>,
	Eric Dumazet <edumazet@google.com>,
	netdev@vger.kernel.org, Paolo Abeni <pabeni@redhat.com>,
	Saeed Mahameed <saeedm@nvidia.com>
Subject: [PATCH net-next 3/6] net/mlx5e: Don't access directly DMA device pointer
Date: Sun, 23 Oct 2022 20:22:55 +0300	[thread overview]
Message-ID: <18c347546df19a654fa6275ce9252db3db861398.1666545480.git.leonro@nvidia.com> (raw)
In-Reply-To: <cover.1666545480.git.leonro@nvidia.com>

From: Leon Romanovsky <leonro@nvidia.com>

Use specialized helper to fetch DMA device pointer.

Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c
index 41970067917b..4831a3e9556c 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c
@@ -186,7 +186,7 @@ static int mlx5e_macsec_aso_reg_mr(struct mlx5_core_dev *mdev, struct mlx5e_macs
 		return err;
 	}
 
-	dma_device = &mdev->pdev->dev;
+	dma_device = mlx5_core_dma_dev(mdev);
 	dma_addr = dma_map_single(dma_device, umr->ctx, sizeof(umr->ctx), DMA_BIDIRECTIONAL);
 	err = dma_mapping_error(dma_device, dma_addr);
 	if (err) {
-- 
2.37.3


  parent reply	other threads:[~2022-10-23 17:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-23 17:22 [PATCH net-next 0/6] Various cleanups for mlx5 Leon Romanovsky
2022-10-23 17:22 ` [PATCH net-next 1/6] net/mlx5e: Support devlink reload of IPsec core Leon Romanovsky
2022-10-24 14:17   ` Saeed Mahameed
2022-10-24 16:47     ` Leon Romanovsky
2022-10-23 17:22 ` [PATCH net-next 2/6] net/mlx5: Return ready to use ASO WQE Leon Romanovsky
2022-10-23 17:22 ` Leon Romanovsky [this message]
2022-10-23 17:22 ` [PATCH net-next 4/6] net/mlx5e: Delete always true DMA check Leon Romanovsky
2022-10-23 17:22 ` [PATCH net-next 5/6] net/mlx5: Remove redundant check Leon Romanovsky
2022-10-23 17:22 ` [PATCH net-next 6/6] net/mlx5e: Use read lock for eswitch get callbacks Leon Romanovsky

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=18c347546df19a654fa6275ce9252db3db861398.1666545480.git.leonro@nvidia.com \
    --to=leon@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=leonro@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=saeedm@nvidia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.