]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
scsi: be2iscsi: Replace PCI pool old API
authorRomain Perier <romain.perier@collabora.com>
Thu, 6 Jul 2017 08:13:03 +0000 (10:13 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 7 Aug 2017 18:04:01 +0000 (14:04 -0400)
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>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/be2iscsi/be_iscsi.c
drivers/scsi/be2iscsi/be_main.c
drivers/scsi/be2iscsi/be_main.h

index 97dca4681784fc4b2cc3cdd57a0587d77a4ab5bc..43a80ce5ce6a9fc9955395f4ed3b556324516626 100644 (file)
@@ -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);
 }
 
index f862332261f82230a9fec82531c47d3f667f9126..b4542e7e2ad5b77cb910f25554ba98d3663fb1cb 100644 (file)
@@ -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;
index 338dbe0800c16e6d0298636d1d5d45b7e9b56c18..81ce3ffda968e79c19b16f031bb4b8899bf3a448 100644 (file)
@@ -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;
 };
 
 /**