Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1604046
| From | Romain Perier <romain.perier@collabora.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v6 09/15] scsi: csiostor: Replace PCI pool old API |
| Date | 2017-03-19 18:10 +0100 |
| Message-ID | <tmMv9-oz-47@gated-at.bofh.it> (permalink) |
| References | <tmMv8-oz-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
The PCI pool API is deprecated. This commit replaces the PCI pool old
API by the appropriate function with the DMA pool API. It also updates
the name of some variables and the content of comments, accordingly.
Signed-off-by: Romain Perier <romain.perier@collabora.com>
Reviewed-by: Peter Senna Tschudin <peter.senna@collabora.com>
---
drivers/scsi/csiostor/csio_hw.h | 2 +-
drivers/scsi/csiostor/csio_init.c | 11 ++++++-----
drivers/scsi/csiostor/csio_scsi.c | 6 +++---
3 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/drivers/scsi/csiostor/csio_hw.h b/drivers/scsi/csiostor/csio_hw.h
index 029bef8..55b04fc 100644
--- a/drivers/scsi/csiostor/csio_hw.h
+++ b/drivers/scsi/csiostor/csio_hw.h
@@ -465,7 +465,7 @@ struct csio_hw {
struct csio_pport pport[CSIO_MAX_PPORTS]; /* Ports (XGMACs) */
struct csio_hw_params params; /* Hw parameters */
- struct pci_pool *scsi_pci_pool; /* PCI pool for SCSI */
+ struct dma_pool *scsi_dma_pool; /* DMA pool for SCSI */
mempool_t *mb_mempool; /* Mailbox memory pool*/
mempool_t *rnode_mempool; /* rnode memory pool */
diff --git a/drivers/scsi/csiostor/csio_init.c b/drivers/scsi/csiostor/csio_init.c
index dbe416f..292964c 100644
--- a/drivers/scsi/csiostor/csio_init.c
+++ b/drivers/scsi/csiostor/csio_init.c
@@ -485,9 +485,10 @@ csio_resource_alloc(struct csio_hw *hw)
if (!hw->rnode_mempool)
goto err_free_mb_mempool;
- hw->scsi_pci_pool = pci_pool_create("csio_scsi_pci_pool", hw->pdev,
- CSIO_SCSI_RSP_LEN, 8, 0);
- if (!hw->scsi_pci_pool)
+ hw->scsi_dma_pool = dma_pool_create("csio_scsi_dma_pool",
+ &hw->pdev->dev, CSIO_SCSI_RSP_LEN,
+ 8, 0);
+ if (!hw->scsi_dma_pool)
goto err_free_rn_pool;
return 0;
@@ -505,8 +506,8 @@ csio_resource_alloc(struct csio_hw *hw)
static void
csio_resource_free(struct csio_hw *hw)
{
- pci_pool_destroy(hw->scsi_pci_pool);
- hw->scsi_pci_pool = NULL;
+ dma_pool_destroy(hw->scsi_dma_pool);
+ hw->scsi_dma_pool = NULL;
mempool_destroy(hw->rnode_mempool);
hw->rnode_mempool = NULL;
mempool_destroy(hw->mb_mempool);
diff --git a/drivers/scsi/csiostor/csio_scsi.c b/drivers/scsi/csiostor/csio_scsi.c
index a1ff75f..dab0d3f 100644
--- a/drivers/scsi/csiostor/csio_scsi.c
+++ b/drivers/scsi/csiostor/csio_scsi.c
@@ -2445,7 +2445,7 @@ csio_scsim_init(struct csio_scsim *scm, struct csio_hw *hw)
/* Allocate Dma buffers for Response Payload */
dma_buf = &ioreq->dma_buf;
- dma_buf->vaddr = pci_pool_alloc(hw->scsi_pci_pool, GFP_KERNEL,
+ dma_buf->vaddr = dma_pool_alloc(hw->scsi_dma_pool, GFP_KERNEL,
&dma_buf->paddr);
if (!dma_buf->vaddr) {
csio_err(hw,
@@ -2485,7 +2485,7 @@ csio_scsim_init(struct csio_scsim *scm, struct csio_hw *hw)
ioreq = (struct csio_ioreq *)tmp;
dma_buf = &ioreq->dma_buf;
- pci_pool_free(hw->scsi_pci_pool, dma_buf->vaddr,
+ dma_pool_free(hw->scsi_dma_pool, dma_buf->vaddr,
dma_buf->paddr);
kfree(ioreq);
@@ -2516,7 +2516,7 @@ csio_scsim_exit(struct csio_scsim *scm)
ioreq = (struct csio_ioreq *)tmp;
dma_buf = &ioreq->dma_buf;
- pci_pool_free(scm->hw->scsi_pci_pool, dma_buf->vaddr,
+ dma_pool_free(scm->hw->scsi_dma_pool, dma_buf->vaddr,
dma_buf->paddr);
kfree(ioreq);
--
2.9.3
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v6 00/15] Replace PCI pool by DMA pool API Romain Perier <romain.perier@collabora.com> - 2017-03-19 18:10 +0100
[PATCH v6 10/15] scsi: lpfc: Replace PCI pool old API Romain Perier <romain.perier@collabora.com> - 2017-03-19 18:10 +0100
[PATCH v6 06/15] mlx5: Replace PCI pool old API Romain Perier <romain.perier@collabora.com> - 2017-03-19 18:10 +0100
Re: [PATCH v6 06/15] mlx5: Replace PCI pool old API Leon Romanovsky <leon@kernel.org> - 2017-03-20 07:40 +0100
Re: [PATCH v6 06/15] mlx5: Replace PCI pool old API Doug Ledford <dledford@redhat.com> - 2017-03-25 04:50 +0100
[PATCH v6 04/15] net: e100: Replace PCI pool old API Romain Perier <romain.perier@collabora.com> - 2017-03-19 18:10 +0100
[PATCH v6 08/15] scsi: be2iscsi: Replace PCI pool old API Romain Perier <romain.perier@collabora.com> - 2017-03-19 18:10 +0100
[PATCH v6 02/15] dmaengine: pch_dma: Replace PCI pool old API Romain Perier <romain.perier@collabora.com> - 2017-03-19 18:10 +0100
[PATCH v6 07/15] wireless: ipw2200: Replace PCI pool old API Romain Perier <romain.perier@collabora.com> - 2017-03-19 18:10 +0100
[PATCH v6 11/15] scsi: megaraid: Replace PCI pool old API Romain Perier <romain.perier@collabora.com> - 2017-03-19 18:10 +0100
[PATCH v6 13/15] scsi: mvsas: Replace PCI pool old API Romain Perier <romain.perier@collabora.com> - 2017-03-19 18:10 +0100
[PATCH v6 03/15] IB/mthca: Replace PCI pool old API Romain Perier <romain.perier@collabora.com> - 2017-03-19 18:10 +0100
Re: [PATCH v6 03/15] IB/mthca: Replace PCI pool old API Doug Ledford <dledford@redhat.com> - 2017-03-25 06:30 +0100
[PATCH v6 12/15] scsi: mpt3sas: Replace PCI pool old API Romain Perier <romain.perier@collabora.com> - 2017-03-19 18:10 +0100
[PATCH v6 09/15] scsi: csiostor: Replace PCI pool old API Romain Perier <romain.perier@collabora.com> - 2017-03-19 18:10 +0100
[PATCH v6 01/15] block: DAC960: Replace PCI pool old API Romain Perier <romain.perier@collabora.com> - 2017-03-19 18:10 +0100
[PATCH v6 14/15] scsi: pmcraid: Replace PCI pool old API Romain Perier <romain.perier@collabora.com> - 2017-03-19 18:20 +0100
[PATCH v6 15/15] PCI: Remove PCI pool macro functions Romain Perier <romain.perier@collabora.com> - 2017-03-19 18:20 +0100
csiph-web