]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blobdiff - drivers/infiniband/sw/rxe/rxe_verbs.c
RDMA/core: remove use of dma_virt_ops
[mirror_ubuntu-hirsute-kernel.git] / drivers / infiniband / sw / rxe / rxe_verbs.c
index 7d32cb246d9ed21711a0ea92d0597c0c7c691532..a2bd91aaa5de956cc1cb777340ff475dc6aff168 100644 (file)
@@ -395,6 +395,9 @@ static struct ib_qp *rxe_create_qp(struct ib_pd *ibpd,
                uresp = udata->outbuf;
        }
 
+       if (init->create_flags)
+               return ERR_PTR(-EOPNOTSUPP);
+
        err = rxe_qp_chk_init(rxe, init);
        if (err)
                goto err1;
@@ -1039,7 +1042,7 @@ static ssize_t parent_show(struct device *device,
        struct rxe_dev *rxe =
                rdma_device_to_drv_device(device, struct rxe_dev, ib_dev);
 
-       return scnprintf(buf, PAGE_SIZE, "%s\n", rxe_parent_name(rxe, 1));
+       return sysfs_emit(buf, "%s\n", rxe_parent_name(rxe, 1));
 }
 
 static DEVICE_ATTR_RO(parent);
@@ -1076,6 +1079,7 @@ static const struct ib_device_ops rxe_dev_ops = {
        .create_cq = rxe_create_cq,
        .create_qp = rxe_create_qp,
        .create_srq = rxe_create_srq,
+       .create_user_ah = rxe_create_ah,
        .dealloc_driver = rxe_dealloc,
        .dealloc_pd = rxe_dealloc_pd,
        .dealloc_ucontext = rxe_dealloc_ucontext,
@@ -1134,22 +1138,9 @@ int rxe_register_device(struct rxe_dev *rxe, const char *ibdev_name)
        dev->local_dma_lkey = 0;
        addrconf_addr_eui48((unsigned char *)&dev->node_guid,
                            rxe->ndev->dev_addr);
-       dev->dev.dma_parms = &rxe->dma_parms;
-       dma_set_max_seg_size(&dev->dev, UINT_MAX);
-       dma_set_coherent_mask(&dev->dev, dma_get_required_mask(&dev->dev));
-
-       dev->uverbs_cmd_mask |=
-           BIT_ULL(IB_USER_VERBS_CMD_POST_SRQ_RECV)
-           | BIT_ULL(IB_USER_VERBS_CMD_POST_SEND)
-           | BIT_ULL(IB_USER_VERBS_CMD_POST_RECV)
-           | BIT_ULL(IB_USER_VERBS_CMD_POLL_CQ)
-           | BIT_ULL(IB_USER_VERBS_CMD_PEEK_CQ)
-           | BIT_ULL(IB_USER_VERBS_CMD_REQ_NOTIFY_CQ)
-           | BIT_ULL(IB_USER_VERBS_CMD_CREATE_AH)
-           | BIT_ULL(IB_USER_VERBS_CMD_MODIFY_AH)
-           | BIT_ULL(IB_USER_VERBS_CMD_QUERY_AH)
-           | BIT_ULL(IB_USER_VERBS_CMD_DESTROY_AH)
-           ;
+
+       dev->uverbs_cmd_mask |= BIT_ULL(IB_USER_VERBS_CMD_POST_SEND) |
+                               BIT_ULL(IB_USER_VERBS_CMD_REQ_NOTIFY_CQ);
 
        ib_set_device_ops(dev, &rxe_dev_ops);
        err = ib_device_set_netdev(&rxe->ib_dev, rxe->ndev, 1);