Commit 4dbd6712 authored by Romain Perier's avatar Romain Perier Committed by Martin K. Petersen

scsi: mvsas: Replace PCI pool old API

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: default avatarRomain Perier <romain.perier@collabora.com>
Reviewed-by: default avatarPeter Senna Tschudin <peter.senna@collabora.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent e9d98418
...@@ -125,8 +125,7 @@ static void mvs_free(struct mvs_info *mvi) ...@@ -125,8 +125,7 @@ static void mvs_free(struct mvs_info *mvi)
else else
slot_nr = MVS_CHIP_SLOT_SZ; slot_nr = MVS_CHIP_SLOT_SZ;
if (mvi->dma_pool) dma_pool_destroy(mvi->dma_pool);
pci_pool_destroy(mvi->dma_pool);
if (mvi->tx) if (mvi->tx)
dma_free_coherent(mvi->dev, dma_free_coherent(mvi->dev,
...@@ -296,7 +295,8 @@ static int mvs_alloc(struct mvs_info *mvi, struct Scsi_Host *shost) ...@@ -296,7 +295,8 @@ static int mvs_alloc(struct mvs_info *mvi, struct Scsi_Host *shost)
goto err_out; goto err_out;
sprintf(pool_name, "%s%d", "mvs_dma_pool", mvi->id); sprintf(pool_name, "%s%d", "mvs_dma_pool", mvi->id);
mvi->dma_pool = pci_pool_create(pool_name, mvi->pdev, MVS_SLOT_BUF_SZ, 16, 0); mvi->dma_pool = dma_pool_create(pool_name, &mvi->pdev->dev,
MVS_SLOT_BUF_SZ, 16, 0);
if (!mvi->dma_pool) { if (!mvi->dma_pool) {
printk(KERN_DEBUG "failed to create dma pool %s.\n", pool_name); printk(KERN_DEBUG "failed to create dma pool %s.\n", pool_name);
goto err_out; goto err_out;
......
...@@ -790,7 +790,7 @@ static int mvs_task_prep(struct sas_task *task, struct mvs_info *mvi, int is_tmf ...@@ -790,7 +790,7 @@ static int mvs_task_prep(struct sas_task *task, struct mvs_info *mvi, int is_tmf
slot->n_elem = n_elem; slot->n_elem = n_elem;
slot->slot_tag = tag; slot->slot_tag = tag;
slot->buf = pci_pool_alloc(mvi->dma_pool, GFP_ATOMIC, &slot->buf_dma); slot->buf = dma_pool_alloc(mvi->dma_pool, GFP_ATOMIC, &slot->buf_dma);
if (!slot->buf) { if (!slot->buf) {
rc = -ENOMEM; rc = -ENOMEM;
goto err_out_tag; goto err_out_tag;
...@@ -840,7 +840,7 @@ static int mvs_task_prep(struct sas_task *task, struct mvs_info *mvi, int is_tmf ...@@ -840,7 +840,7 @@ static int mvs_task_prep(struct sas_task *task, struct mvs_info *mvi, int is_tmf
return rc; return rc;
err_out_slot_buf: err_out_slot_buf:
pci_pool_free(mvi->dma_pool, slot->buf, slot->buf_dma); dma_pool_free(mvi->dma_pool, slot->buf, slot->buf_dma);
err_out_tag: err_out_tag:
mvs_tag_free(mvi, tag); mvs_tag_free(mvi, tag);
err_out: err_out:
...@@ -918,7 +918,7 @@ static void mvs_slot_task_free(struct mvs_info *mvi, struct sas_task *task, ...@@ -918,7 +918,7 @@ static void mvs_slot_task_free(struct mvs_info *mvi, struct sas_task *task,
} }
if (slot->buf) { if (slot->buf) {
pci_pool_free(mvi->dma_pool, slot->buf, slot->buf_dma); dma_pool_free(mvi->dma_pool, slot->buf, slot->buf_dma);
slot->buf = NULL; slot->buf = NULL;
} }
list_del_init(&slot->entry); list_del_init(&slot->entry);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment