RDMA/cxgb3: Use the dma state API instead of pci equivalents
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Fri, 2 Apr 2010 04:29:38 +0000 (04:29 +0000)
committerRoland Dreier <rolandd@cisco.com>
Wed, 21 Apr 2010 22:17:38 +0000 (15:17 -0700)
The DMA API is preferred; no functional change.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/cxgb3/cxio_hal.c
drivers/infiniband/hw/cxgb3/cxio_hal.h
drivers/infiniband/hw/cxgb3/cxio_wr.h

index 35f286f..005b7b5 100644 (file)
@@ -174,7 +174,7 @@ int cxio_create_cq(struct cxio_rdev *rdev_p, struct t3_cq *cq, int kernel)
                kfree(cq->sw_queue);
                return -ENOMEM;
        }
-       pci_unmap_addr_set(cq, mapping, cq->dma_addr);
+       dma_unmap_addr_set(cq, mapping, cq->dma_addr);
        memset(cq->queue, 0, size);
        setup.id = cq->cqid;
        setup.base_addr = (u64) (cq->dma_addr);
@@ -297,7 +297,7 @@ int cxio_create_qp(struct cxio_rdev *rdev_p, u32 kernel_domain,
                goto err4;
 
        memset(wq->queue, 0, depth * sizeof(union t3_wr));
-       pci_unmap_addr_set(wq, mapping, wq->dma_addr);
+       dma_unmap_addr_set(wq, mapping, wq->dma_addr);
        wq->doorbell = (void __iomem *)rdev_p->rnic_info.kdb_addr;
        if (!kernel_domain)
                wq->udb = (u64)rdev_p->rnic_info.udbell_physbase +
@@ -325,7 +325,7 @@ int cxio_destroy_cq(struct cxio_rdev *rdev_p, struct t3_cq *cq)
        dma_free_coherent(&(rdev_p->rnic_info.pdev->dev),
                          (1UL << (cq->size_log2))
                          * sizeof(struct t3_cqe), cq->queue,
-                         pci_unmap_addr(cq, mapping));
+                         dma_unmap_addr(cq, mapping));
        cxio_hal_put_cqid(rdev_p->rscp, cq->cqid);
        return err;
 }
@@ -336,7 +336,7 @@ int cxio_destroy_qp(struct cxio_rdev *rdev_p, struct t3_wq *wq,
        dma_free_coherent(&(rdev_p->rnic_info.pdev->dev),
                          (1UL << (wq->size_log2))
                          * sizeof(union t3_wr), wq->queue,
-                         pci_unmap_addr(wq, mapping));
+                         dma_unmap_addr(wq, mapping));
        kfree(wq->sq);
        cxio_hal_rqtpool_free(rdev_p, wq->rq_addr, (1UL << wq->rq_size_log2));
        kfree(wq->rq);
@@ -537,7 +537,7 @@ static int cxio_hal_init_ctrl_qp(struct cxio_rdev *rdev_p)
                err = -ENOMEM;
                goto err;
        }
-       pci_unmap_addr_set(&rdev_p->ctrl_qp, mapping,
+       dma_unmap_addr_set(&rdev_p->ctrl_qp, mapping,
                           rdev_p->ctrl_qp.dma_addr);
        rdev_p->ctrl_qp.doorbell = (void __iomem *)rdev_p->rnic_info.kdb_addr;
        memset(rdev_p->ctrl_qp.workq, 0,
@@ -583,7 +583,7 @@ static int cxio_hal_destroy_ctrl_qp(struct cxio_rdev *rdev_p)
        dma_free_coherent(&(rdev_p->rnic_info.pdev->dev),
                          (1UL << T3_CTRL_QP_SIZE_LOG2)
                          * sizeof(union t3_wr), rdev_p->ctrl_qp.workq,
-                         pci_unmap_addr(&rdev_p->ctrl_qp, mapping));
+                         dma_unmap_addr(&rdev_p->ctrl_qp, mapping));
        return cxio_hal_clear_qp_ctx(rdev_p, T3_CTRL_QP_ID);
 }
 
index 073373c..8f0caf7 100644 (file)
@@ -71,7 +71,7 @@ struct cxio_hal_ctrl_qp {
        wait_queue_head_t waitq;/* wait for RspQ/CQE msg */
        union t3_wr *workq;     /* the work request queue */
        dma_addr_t dma_addr;    /* pci bus address of the workq */
-       DECLARE_PCI_UNMAP_ADDR(mapping)
+       DEFINE_DMA_UNMAP_ADDR(mapping);
        void __iomem *doorbell;
 };
 
index 15073b2..e5ddb63 100644 (file)
@@ -691,7 +691,7 @@ struct t3_swrq {
 struct t3_wq {
        union t3_wr *queue;             /* DMA accessable memory */
        dma_addr_t dma_addr;            /* DMA address for HW */
-       DECLARE_PCI_UNMAP_ADDR(mapping) /* unmap kruft */
+       DEFINE_DMA_UNMAP_ADDR(mapping); /* unmap kruft */
        u32 error;                      /* 1 once we go to ERROR */
        u32 qpid;
        u32 wptr;                       /* idx to next available WR slot */
@@ -718,7 +718,7 @@ struct t3_cq {
        u32 wptr;
        u32 size_log2;
        dma_addr_t dma_addr;
-       DECLARE_PCI_UNMAP_ADDR(mapping)
+       DEFINE_DMA_UNMAP_ADDR(mapping);
        struct t3_cqe *queue;
        struct t3_cqe *sw_queue;
        u32 sw_rptr;