From: Romain Perier <romain.perier@collabora.com>
To: Dan Williams <dan.j.williams@intel.com>,
Doug Ledford <dledford@redhat.com>,
Sean Hefty <sean.hefty@intel.com>,
Hal Rosenstock <hal.rosenstock@gmail.com>,
jeffrey.t.kirsher@intel.com,
"David S. Miller" <davem@davemloft.net>,
stas.yakovlev@gmail.com,
"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Felipe Balbi <balbi@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-rdma@vger.kernel.org, netdev@vger.kernel.org,
linux-usb@vger.kernel.org, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org,
Romain Perier <romain.perier@collabora.com>,
Peter Senna Tschudin <peter.senna@collabora.co.uk>
Subject: [PATCH v6 08/15] scsi: be2iscsi: Replace PCI pool old API
Date: Sun, 19 Mar 2017 18:03:57 +0100 [thread overview]
Message-ID: <20170319170404.17362-9-romain.perier@collabora.com> (raw)
In-Reply-To: <20170319170404.17362-1-romain.perier@collabora.com>
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 a484457..d76ef77 100644
--- a/drivers/scsi/be2iscsi/be_iscsi.c
+++ b/drivers/scsi/be2iscsi/be_iscsi.c
@@ -87,8 +87,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)
@@ -113,7 +113,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 32b2713..dd43480 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -4307,7 +4307,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;
@@ -4424,7 +4424,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;
@@ -4551,7 +4551,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 2188579..cf58d31 100644
--- a/drivers/scsi/be2iscsi/be_main.h
+++ b/drivers/scsi/be2iscsi/be_main.h
@@ -446,7 +446,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.9.3
next prev parent reply other threads:[~2017-03-19 17:03 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-19 17:03 [PATCH v6 00/15] Replace PCI pool by DMA pool API Romain Perier
2017-03-19 17:03 ` [PATCH v6 01/15] block: DAC960: Replace PCI pool old API Romain Perier
2017-03-19 17:03 ` [PATCH v6 02/15] dmaengine: pch_dma: " Romain Perier
2017-03-19 17:03 ` [PATCH v6 03/15] IB/mthca: " Romain Perier
[not found] ` <20170319170404.17362-4-romain.perier-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2017-03-25 5:24 ` Doug Ledford
2017-03-19 17:03 ` [PATCH v6 04/15] net: e100: " Romain Perier
2017-03-19 17:03 ` [PATCH v6 05/15] mlx4: " Romain Perier
2017-03-20 6:32 ` Leon Romanovsky
2017-03-25 17:03 ` Doug Ledford
2017-03-19 17:03 ` [PATCH v6 06/15] mlx5: " Romain Perier
2017-03-20 6:31 ` Leon Romanovsky
2017-03-25 3:47 ` Doug Ledford
2017-03-19 17:03 ` [PATCH v6 07/15] wireless: ipw2200: " Romain Perier
2017-03-19 17:03 ` Romain Perier [this message]
2017-03-19 17:03 ` [PATCH v6 10/15] scsi: lpfc: " Romain Perier
2017-03-19 17:04 ` [PATCH v6 12/15] scsi: mpt3sas: " Romain Perier
2017-03-19 17:04 ` [PATCH v6 14/15] scsi: pmcraid: " Romain Perier
2017-03-19 17:04 ` [PATCH v6 15/15] PCI: Remove PCI pool macro functions Romain Perier
[not found] ` <20170319170404.17362-1-romain.perier-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2017-03-19 17:03 ` [PATCH v6 09/15] scsi: csiostor: Replace PCI pool old API Romain Perier
2017-03-19 17:04 ` [PATCH v6 11/15] scsi: megaraid: " Romain Perier
2017-03-19 17:04 ` [PATCH v6 13/15] scsi: mvsas: " Romain Perier
2017-03-31 18:21 ` [PATCH v6 00/15] Replace PCI pool by DMA pool API Romain Perier
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=20170319170404.17362-9-romain.perier@collabora.com \
--to=romain.perier@collabora.com \
--cc=balbi@kernel.org \
--cc=dan.j.williams@intel.com \
--cc=davem@davemloft.net \
--cc=dledford@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=hal.rosenstock@gmail.com \
--cc=jeffrey.t.kirsher@intel.com \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=netdev@vger.kernel.org \
--cc=peter.senna@collabora.co.uk \
--cc=sean.hefty@intel.com \
--cc=stas.yakovlev@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).