These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / infiniband / hw / cxgb4 / device.c
index 7e895d7..58fce17 100644 (file)
@@ -795,13 +795,7 @@ static int c4iw_rdev_open(struct c4iw_rdev *rdev)
                goto err1;
        }
 
-       /*
-        * qpshift is the number of bits to shift the qpid left in order
-        * to get the correct address of the doorbell for that qp.
-        */
-       rdev->qpshift = PAGE_SHIFT - ilog2(rdev->lldi.udb_density);
        rdev->qpmask = rdev->lldi.udb_density - 1;
-       rdev->cqshift = PAGE_SHIFT - ilog2(rdev->lldi.ucq_density);
        rdev->cqmask = rdev->lldi.ucq_density - 1;
        PDBG("%s dev %s stag start 0x%0x size 0x%0x num stags %d "
             "pbl start 0x%0x size 0x%0x rq start 0x%0x size 0x%0x "
@@ -815,14 +809,12 @@ static int c4iw_rdev_open(struct c4iw_rdev *rdev)
             rdev->lldi.vr->qp.size,
             rdev->lldi.vr->cq.start,
             rdev->lldi.vr->cq.size);
-       PDBG("udb len 0x%x udb base %p db_reg %p gts_reg %p qpshift %lu "
-            "qpmask 0x%x cqshift %lu cqmask 0x%x\n",
+       PDBG("udb len 0x%x udb base %p db_reg %p gts_reg %p "
+            "qpmask 0x%x cqmask 0x%x\n",
             (unsigned)pci_resource_len(rdev->lldi.pdev, 2),
             (void *)pci_resource_start(rdev->lldi.pdev, 2),
-            rdev->lldi.db_reg,
-            rdev->lldi.gts_reg,
-            rdev->qpshift, rdev->qpmask,
-            rdev->cqshift, rdev->cqmask);
+            rdev->lldi.db_reg, rdev->lldi.gts_reg,
+            rdev->qpmask, rdev->cqmask);
 
        if (c4iw_num_stags(rdev) == 0) {
                err = -EINVAL;
@@ -970,12 +962,12 @@ static struct c4iw_dev *c4iw_alloc(const struct cxgb4_lld_info *infop)
                devp->rdev.lldi.sge_egrstatuspagesize;
 
        /*
-        * For T5 devices, we map all of BAR2 with WC.
+        * For T5/T6 devices, we map all of BAR2 with WC.
         * For T4 devices with onchip qp mem, we map only that part
         * of BAR2 with WC.
         */
        devp->rdev.bar2_pa = pci_resource_start(devp->rdev.lldi.pdev, 2);
-       if (is_t5(devp->rdev.lldi.adapter_type)) {
+       if (!is_t4(devp->rdev.lldi.adapter_type)) {
                devp->rdev.bar2_kva = ioremap_wc(devp->rdev.bar2_pa,
                        pci_resource_len(devp->rdev.lldi.pdev, 2));
                if (!devp->rdev.bar2_kva) {
@@ -1275,11 +1267,9 @@ static int enable_qp_db(int id, void *p, void *data)
 static void resume_rc_qp(struct c4iw_qp *qp)
 {
        spin_lock(&qp->lock);
-       t4_ring_sq_db(&qp->wq, qp->wq.sq.wq_pidx_inc,
-                     is_t5(qp->rhp->rdev.lldi.adapter_type), NULL);
+       t4_ring_sq_db(&qp->wq, qp->wq.sq.wq_pidx_inc, NULL);
        qp->wq.sq.wq_pidx_inc = 0;
-       t4_ring_rq_db(&qp->wq, qp->wq.rq.wq_pidx_inc,
-                     is_t5(qp->rhp->rdev.lldi.adapter_type), NULL);
+       t4_ring_rq_db(&qp->wq, qp->wq.rq.wq_pidx_inc, NULL);
        qp->wq.rq.wq_pidx_inc = 0;
        spin_unlock(&qp->lock);
 }