Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1604033 > unrolled thread
| Started by | Romain Perier <romain.perier@collabora.com> |
|---|---|
| First post | 2017-03-19 18:10 +0100 |
| Last post | 2017-03-25 18:10 +0100 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v6 05/15] mlx4: Replace PCI pool old API Romain Perier <romain.perier@collabora.com> - 2017-03-19 18:10 +0100
Re: [PATCH v6 05/15] mlx4: Replace PCI pool old API Leon Romanovsky <leon@kernel.org> - 2017-03-20 07:40 +0100
Re: [PATCH v6 05/15] mlx4: Replace PCI pool old API Doug Ledford <dledford@redhat.com> - 2017-03-25 18:10 +0100
| From | Romain Perier <romain.perier@collabora.com> |
|---|---|
| Date | 2017-03-19 18:10 +0100 |
| Subject | [PATCH v6 05/15] mlx4: Replace PCI pool old API |
| Message-ID | <tmMv8-oz-7@gated-at.bofh.it> |
The PCI pool API is deprecated. This commit replaces the PCI pool old
API by the appropriate function with the DMA pool API.
Signed-off-by: Romain Perier <romain.perier@collabora.com>
Acked-by: Peter Senna Tschudin <peter.senna@collabora.com>
Tested-by: Peter Senna Tschudin <peter.senna@collabora.com>
---
drivers/net/ethernet/mellanox/mlx4/cmd.c | 10 +++++-----
drivers/net/ethernet/mellanox/mlx4/mlx4.h | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx4/cmd.c b/drivers/net/ethernet/mellanox/mlx4/cmd.c
index e8c1051..fb69604 100644
--- a/drivers/net/ethernet/mellanox/mlx4/cmd.c
+++ b/drivers/net/ethernet/mellanox/mlx4/cmd.c
@@ -2516,8 +2516,8 @@ int mlx4_cmd_init(struct mlx4_dev *dev)
}
if (!priv->cmd.pool) {
- priv->cmd.pool = pci_pool_create("mlx4_cmd",
- dev->persist->pdev,
+ priv->cmd.pool = dma_pool_create("mlx4_cmd",
+ &dev->persist->pdev->dev,
MLX4_MAILBOX_SIZE,
MLX4_MAILBOX_SIZE, 0);
if (!priv->cmd.pool)
@@ -2588,7 +2588,7 @@ void mlx4_cmd_cleanup(struct mlx4_dev *dev, int cleanup_mask)
struct mlx4_priv *priv = mlx4_priv(dev);
if (priv->cmd.pool && (cleanup_mask & MLX4_CMD_CLEANUP_POOL)) {
- pci_pool_destroy(priv->cmd.pool);
+ dma_pool_destroy(priv->cmd.pool);
priv->cmd.pool = NULL;
}
@@ -2680,7 +2680,7 @@ struct mlx4_cmd_mailbox *mlx4_alloc_cmd_mailbox(struct mlx4_dev *dev)
if (!mailbox)
return ERR_PTR(-ENOMEM);
- mailbox->buf = pci_pool_zalloc(mlx4_priv(dev)->cmd.pool, GFP_KERNEL,
+ mailbox->buf = dma_pool_zalloc(mlx4_priv(dev)->cmd.pool, GFP_KERNEL,
&mailbox->dma);
if (!mailbox->buf) {
kfree(mailbox);
@@ -2697,7 +2697,7 @@ void mlx4_free_cmd_mailbox(struct mlx4_dev *dev,
if (!mailbox)
return;
- pci_pool_free(mlx4_priv(dev)->cmd.pool, mailbox->buf, mailbox->dma);
+ dma_pool_free(mlx4_priv(dev)->cmd.pool, mailbox->buf, mailbox->dma);
kfree(mailbox);
}
EXPORT_SYMBOL_GPL(mlx4_free_cmd_mailbox);
diff --git a/drivers/net/ethernet/mellanox/mlx4/mlx4.h b/drivers/net/ethernet/mellanox/mlx4/mlx4.h
index b4f1bc5..69c8764 100644
--- a/drivers/net/ethernet/mellanox/mlx4/mlx4.h
+++ b/drivers/net/ethernet/mellanox/mlx4/mlx4.h
@@ -628,7 +628,7 @@ struct mlx4_mgm {
};
struct mlx4_cmd {
- struct pci_pool *pool;
+ struct dma_pool *pool;
void __iomem *hcr;
struct mutex slave_cmd_mutex;
struct semaphore poll_sem;
--
2.9.3
[toc] | [next] | [standalone]
| From | Leon Romanovsky <leon@kernel.org> |
|---|---|
| Date | 2017-03-20 07:40 +0100 |
| Message-ID | <tmZ90-Md-7@gated-at.bofh.it> |
| In reply to | #1604033 |
[Multipart message — attachments visible in raw view] — view raw
On Sun, Mar 19, 2017 at 06:03:54PM +0100, Romain Perier wrote: > The PCI pool API is deprecated. This commit replaces the PCI pool old > API by the appropriate function with the DMA pool API. > > Signed-off-by: Romain Perier <romain.perier@collabora.com> > Acked-by: Peter Senna Tschudin <peter.senna@collabora.com> > Tested-by: Peter Senna Tschudin <peter.senna@collabora.com> > --- > drivers/net/ethernet/mellanox/mlx4/cmd.c | 10 +++++----- > drivers/net/ethernet/mellanox/mlx4/mlx4.h | 2 +- > 2 files changed, 6 insertions(+), 6 deletions(-) > Thanks, Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
[toc] | [prev] | [next] | [standalone]
| From | Doug Ledford <dledford@redhat.com> |
|---|---|
| Date | 2017-03-25 18:10 +0100 |
| Message-ID | <toXmp-3Tu-9@gated-at.bofh.it> |
| In reply to | #1604199 |
On Mon, 2017-03-20 at 08:32 +0200, Leon Romanovsky wrote: > On Sun, Mar 19, 2017 at 06:03:54PM +0100, Romain Perier wrote: > > > > The PCI pool API is deprecated. This commit replaces the PCI pool > > old > > API by the appropriate function with the DMA pool API. > > > > Signed-off-by: Romain Perier <romain.perier@collabora.com> > > Acked-by: Peter Senna Tschudin <peter.senna@collabora.com> > > Tested-by: Peter Senna Tschudin <peter.senna@collabora.com> > > --- > > drivers/net/ethernet/mellanox/mlx4/cmd.c | 10 +++++----- > > drivers/net/ethernet/mellanox/mlx4/mlx4.h | 2 +- > > 2 files changed, 6 insertions(+), 6 deletions(-) > > > > Thanks, > Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Changes look fine to me, and it has been tested on this specific hardware and confirmed RDMA communications still work. Acked-by: Doug Ledford <dledford@redhat.com> Tested-by: Doug Ledford <dledford@redhat.com> -- Doug Ledford <dledford@redhat.com> GPG KeyID: B826A3330E572FDD Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web