Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1632937
| From | Romain Perier <romain.perier@collabora.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v8 08/15] scsi: be2iscsi: Replace PCI pool old API |
| Date | 2017-04-28 16:40 +0200 |
| Message-ID | <tBfdU-av-15@gated-at.bofh.it> (permalink) |
| References | <tBf4d-6x-5@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.
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/scsi/be2iscsi/be_iscsi.c | 6 +++---
drivers/scsi/be2iscsi/be_main.c | 6 +++---
drivers/scsi/be2iscsi/be_main.h | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/scsi/be2iscsi/be_iscsi.c b/drivers/scsi/be2iscsi/be_iscsi.c
index 97dca4681784..43a80ce5ce6a 100644
--- a/drivers/scsi/be2iscsi/be_iscsi.c
+++ b/drivers/scsi/be2iscsi/be_iscsi.c
@@ -82,8 +82,8 @@ struct iscsi_cls_session *beiscsi_session_create(struct iscsi_endpoint *ep,
return NULL;
sess = cls_session->dd_data;
beiscsi_sess = sess->dd_data;
- beiscsi_sess->bhs_pool = pci_pool_create("beiscsi_bhs_pool",
- phba->pcidev,
+ beiscsi_sess->bhs_pool = dma_pool_create("beiscsi_bhs_pool",
+ &phba->pcidev->dev,
sizeof(struct be_cmd_bhs),
64, 0);
if (!beiscsi_sess->bhs_pool)
@@ -108,7 +108,7 @@ void beiscsi_session_destroy(struct iscsi_cls_session *cls_session)
struct beiscsi_session *beiscsi_sess = sess->dd_data;
printk(KERN_INFO "In beiscsi_session_destroy\n");
- pci_pool_destroy(beiscsi_sess->bhs_pool);
+ dma_pool_destroy(beiscsi_sess->bhs_pool);
iscsi_session_teardown(cls_session);
}
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index f862332261f8..b4542e7e2ad5 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -4257,7 +4257,7 @@ static void beiscsi_cleanup_task(struct iscsi_task *task)
pwrb_context = &phwi_ctrlr->wrb_context[cri_index];
if (io_task->cmd_bhs) {
- pci_pool_free(beiscsi_sess->bhs_pool, io_task->cmd_bhs,
+ dma_pool_free(beiscsi_sess->bhs_pool, io_task->cmd_bhs,
io_task->bhs_pa.u.a64.address);
io_task->cmd_bhs = NULL;
task->hdr = NULL;
@@ -4374,7 +4374,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
struct beiscsi_session *beiscsi_sess = beiscsi_conn->beiscsi_sess;
dma_addr_t paddr;
- io_task->cmd_bhs = pci_pool_alloc(beiscsi_sess->bhs_pool,
+ io_task->cmd_bhs = dma_pool_alloc(beiscsi_sess->bhs_pool,
GFP_ATOMIC, &paddr);
if (!io_task->cmd_bhs)
return -ENOMEM;
@@ -4501,7 +4501,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
if (io_task->pwrb_handle)
free_wrb_handle(phba, pwrb_context, io_task->pwrb_handle);
io_task->pwrb_handle = NULL;
- pci_pool_free(beiscsi_sess->bhs_pool, io_task->cmd_bhs,
+ dma_pool_free(beiscsi_sess->bhs_pool, io_task->cmd_bhs,
io_task->bhs_pa.u.a64.address);
io_task->cmd_bhs = NULL;
return -ENOMEM;
diff --git a/drivers/scsi/be2iscsi/be_main.h b/drivers/scsi/be2iscsi/be_main.h
index 338dbe0800c1..81ce3ffda968 100644
--- a/drivers/scsi/be2iscsi/be_main.h
+++ b/drivers/scsi/be2iscsi/be_main.h
@@ -438,7 +438,7 @@ struct beiscsi_hba {
test_bit(BEISCSI_HBA_ONLINE, &phba->state))
struct beiscsi_session {
- struct pci_pool *bhs_pool;
+ struct dma_pool *bhs_pool;
};
/**
--
2.11.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v8 00/15] Replace PCI pool by DMA pool API Romain Perier <romain.perier@collabora.com> - 2017-04-28 16:30 +0200 [PATCH v8 01/15] block: DAC960: Replace PCI pool old API Romain Perier <romain.perier@collabora.com> - 2017-04-28 16:30 +0200 [PATCH v8 14/15] scsi: pmcraid: Replace PCI pool old API Romain Perier <romain.perier@collabora.com> - 2017-04-28 16:30 +0200 [PATCH v8 10/15] scsi: lpfc: Replace PCI pool old API Romain Perier <romain.perier@collabora.com> - 2017-04-28 16:30 +0200 [PATCH v8 07/15] wireless: ipw2200: Replace PCI pool old API Romain Perier <romain.perier@collabora.com> - 2017-04-28 16:30 +0200 [PATCH v8 09/15] scsi: csiostor: Replace PCI pool old API Romain Perier <romain.perier@collabora.com> - 2017-04-28 16:30 +0200 [PATCH v8 05/15] mlx4: Replace PCI pool old API Romain Perier <romain.perier@collabora.com> - 2017-04-28 16:40 +0200 [PATCH v8 06/15] mlx5: Replace PCI pool old API Romain Perier <romain.perier@collabora.com> - 2017-04-28 16:40 +0200 [PATCH v8 04/15] net: e100: Replace PCI pool old API Romain Perier <romain.perier@collabora.com> - 2017-04-28 16:40 +0200 [PATCH v8 08/15] scsi: be2iscsi: Replace PCI pool old API Romain Perier <romain.perier@collabora.com> - 2017-04-28 16:40 +0200 [PATCH v8 12/15] scsi: mpt3sas: Replace PCI pool old API Romain Perier <romain.perier@collabora.com> - 2017-04-28 16:40 +0200 [PATCH v8 11/15] scsi: megaraid: Replace PCI pool old API Romain Perier <romain.perier@collabora.com> - 2017-04-28 16:40 +0200 [PATCH v8 03/15] IB/mthca: Replace PCI pool old API Romain Perier <romain.perier@collabora.com> - 2017-04-28 16:40 +0200 [PATCH v8 02/15] dmaengine: pch_dma: Replace PCI pool old API Romain Perier <romain.perier@collabora.com> - 2017-04-28 16:40 +0200
csiph-web