RDMA: Move driver_id into struct ib_device_ops
authorJason Gunthorpe <jgg@mellanox.com>
Wed, 5 Jun 2019 17:39:24 +0000 (14:39 -0300)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 10 Jun 2019 19:56:02 +0000 (16:56 -0300)
No reason for every driver to emit code to set this, just make it part of
the driver's existing static const ops structure.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
22 files changed:
drivers/infiniband/core/device.c
drivers/infiniband/core/uverbs_uapi.c
drivers/infiniband/hw/bnxt_re/main.c
drivers/infiniband/hw/cxgb3/iwch_provider.c
drivers/infiniband/hw/cxgb4/provider.c
drivers/infiniband/hw/efa/efa_main.c
drivers/infiniband/hw/hfi1/verbs.c
drivers/infiniband/hw/hns/hns_roce_main.c
drivers/infiniband/hw/i40iw/i40iw_verbs.c
drivers/infiniband/hw/mlx4/main.c
drivers/infiniband/hw/mlx5/main.c
drivers/infiniband/hw/mthca/mthca_provider.c
drivers/infiniband/hw/nes/nes_verbs.c
drivers/infiniband/hw/ocrdma/ocrdma_main.c
drivers/infiniband/hw/qedr/main.c
drivers/infiniband/hw/qib/qib_verbs.c
drivers/infiniband/hw/usnic/usnic_ib_main.c
drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c
drivers/infiniband/sw/rdmavt/vt.c
drivers/infiniband/sw/rxe/rxe_verbs.c
include/rdma/ib_verbs.h
include/rdma/rdma_vt.h

index afb3f59467961a84bcec6cb69b96b449aeb3461d..538d01f27bf8b756e6ea9491d79e069ae1d071c6 100644 (file)
@@ -373,7 +373,7 @@ struct ib_device *ib_device_get_by_name(const char *name,
        down_read(&devices_rwsem);
        device = __ib_device_get_by_name(name);
        if (device && driver_id != RDMA_DRIVER_UNKNOWN &&
-           device->driver_id != driver_id)
+           device->ops.driver_id != driver_id)
                device = NULL;
 
        if (device) {
@@ -1456,7 +1456,7 @@ void ib_unregister_driver(enum rdma_driver_id driver_id)
 
        down_read(&devices_rwsem);
        xa_for_each (&devices, index, ib_dev) {
-               if (ib_dev->driver_id != driver_id)
+               if (ib_dev->ops.driver_id != driver_id)
                        continue;
 
                get_device(&ib_dev->dev);
@@ -2013,7 +2013,7 @@ struct ib_device *ib_device_get_by_netdev(struct net_device *ndev,
                                    (uintptr_t)ndev) {
                if (rcu_access_pointer(cur->netdev) == ndev &&
                    (driver_id == RDMA_DRIVER_UNKNOWN ||
-                    cur->ib_dev->driver_id == driver_id) &&
+                    cur->ib_dev->ops.driver_id == driver_id) &&
                    ib_device_try_get(cur->ib_dev)) {
                        res = cur->ib_dev;
                        break;
@@ -2318,6 +2318,12 @@ void ib_set_device_ops(struct ib_device *dev, const struct ib_device_ops *ops)
 
 #define SET_OBJ_SIZE(ptr, name) SET_DEVICE_OP(ptr, size_##name)
 
+       if (ops->driver_id != RDMA_DRIVER_UNKNOWN) {
+               WARN_ON(dev_ops->driver_id != RDMA_DRIVER_UNKNOWN &&
+                       dev_ops->driver_id != ops->driver_id);
+               dev_ops->driver_id = ops->driver_id;
+       }
+
        SET_DEVICE_OP(dev_ops, add_gid);
        SET_DEVICE_OP(dev_ops, advise_mr);
        SET_DEVICE_OP(dev_ops, alloc_dm);
index ccc4be0a65665100169a6b26cde68efa63856fff..00c5478871322a7a85274140b593eb23ebf451e2 100644 (file)
@@ -647,7 +647,7 @@ struct uverbs_api *uverbs_alloc_api(struct ib_device *ibdev)
                return ERR_PTR(-ENOMEM);
 
        INIT_RADIX_TREE(&uapi->radix, GFP_KERNEL);
-       uapi->driver_id = ibdev->driver_id;
+       uapi->driver_id = ibdev->ops.driver_id;
 
        rc = uapi_merge_def(uapi, ibdev, uverbs_core_api, false);
        if (rc)
index 814f959c7db9656566e1731ae7065c4a579eebe0..1ef5f83ec914fec4cc8d5ca311fd33ab56ffe3cb 100644 (file)
@@ -596,6 +596,8 @@ static void bnxt_re_unregister_ib(struct bnxt_re_dev *rdev)
 }
 
 static const struct ib_device_ops bnxt_re_dev_ops = {
+       .driver_id = RDMA_DRIVER_BNXT_RE,
+
        .add_gid = bnxt_re_add_gid,
        .alloc_hw_stats = bnxt_re_ib_alloc_hw_stats,
        .alloc_mr = bnxt_re_alloc_mr,
@@ -691,7 +693,6 @@ static int bnxt_re_register_ib(struct bnxt_re_dev *rdev)
 
 
        rdma_set_device_sysfs_group(ibdev, &bnxt_re_dev_attr_group);
-       ibdev->driver_id = RDMA_DRIVER_BNXT_RE;
        ib_set_device_ops(ibdev, &bnxt_re_dev_ops);
        ret = ib_device_set_netdev(&rdev->ibdev, rdev->netdev, 1);
        if (ret)
index 4bfab739ec0dbce7be836b334a0c4251a66aeb92..9a9527fdcb9a253a6620a87328a14084c0cc561f 100644 (file)
@@ -1236,6 +1236,8 @@ static void get_dev_fw_ver_str(struct ib_device *ibdev, char *str)
 }
 
 static const struct ib_device_ops iwch_dev_ops = {
+       .driver_id = RDMA_DRIVER_CXGB3,
+
        .alloc_hw_stats = iwch_alloc_stats,
        .alloc_mr = iwch_alloc_mr,
        .alloc_mw = iwch_alloc_mw,
@@ -1319,7 +1321,6 @@ int iwch_register_device(struct iwch_dev *dev)
        memcpy(dev->ibdev.iw_ifname, dev->rdev.t3cdev_p->lldev->name,
               sizeof(dev->ibdev.iw_ifname));
 
-       dev->ibdev.driver_id = RDMA_DRIVER_CXGB3;
        rdma_set_device_sysfs_group(&dev->ibdev, &iwch_attr_group);
        ib_set_device_ops(&dev->ibdev, &iwch_dev_ops);
        return ib_register_device(&dev->ibdev, "cxgb3_%d");
index 8ed75b141521a55034a272fbc1a92e5ef250db78..74644afe25ab3a4c9d617e39b05d16adf7e852c0 100644 (file)
@@ -489,6 +489,8 @@ static int fill_res_entry(struct sk_buff *msg, struct rdma_restrack_entry *res)
 }
 
 static const struct ib_device_ops c4iw_dev_ops = {
+       .driver_id = RDMA_DRIVER_CXGB4,
+
        .alloc_hw_stats = c4iw_alloc_stats,
        .alloc_mr = c4iw_alloc_mr,
        .alloc_mw = c4iw_alloc_mw,
@@ -599,7 +601,6 @@ void c4iw_register_device(struct work_struct *work)
               sizeof(dev->ibdev.iw_ifname));
 
        rdma_set_device_sysfs_group(&dev->ibdev, &c4iw_attr_group);
-       dev->ibdev.driver_id = RDMA_DRIVER_CXGB4;
        ib_set_device_ops(&dev->ibdev, &c4iw_dev_ops);
        ret = set_netdevs(&dev->ibdev, &dev->rdev);
        if (ret)
index db974caf1eb1a55d0cbbece5b97f1e2b8ad4854a..3803dd4526b508ee38730ec2a54a5d9cf48282b9 100644 (file)
@@ -197,6 +197,8 @@ static void efa_stats_init(struct efa_dev *dev)
 }
 
 static const struct ib_device_ops efa_dev_ops = {
+       .driver_id = RDMA_DRIVER_EFA,
+
        .alloc_pd = efa_alloc_pd,
        .alloc_ucontext = efa_alloc_ucontext,
        .create_ah = efa_create_ah,
@@ -287,7 +289,6 @@ static int efa_ib_device_add(struct efa_dev *dev)
        dev->ibdev.uverbs_ex_cmd_mask =
                (1ull << IB_USER_VERBS_EX_CMD_QUERY_DEVICE);
 
-       dev->ibdev.driver_id = RDMA_DRIVER_EFA;
        ib_set_device_ops(&dev->ibdev, &efa_dev_ops);
 
        err = ib_register_device(&dev->ibdev, "efa_%d");
index 1eb4105b2d22c0b79da7f3135efc1ee8a55e0897..a97f4f9e5c6a8ad1d605e50024f7406c00d22370 100644 (file)
@@ -1779,6 +1779,8 @@ static int get_hw_stats(struct ib_device *ibdev, struct rdma_hw_stats *stats,
 }
 
 static const struct ib_device_ops hfi1_dev_ops = {
+       .driver_id = RDMA_DRIVER_HFI1,
+
        .alloc_hw_stats = alloc_hw_stats,
        .alloc_rdma_netdev = hfi1_vnic_alloc_rn,
        .get_dev_fw_str = hfi1_get_dev_fw_str,
@@ -1923,7 +1925,7 @@ int hfi1_register_ib_device(struct hfi1_devdata *dd)
        rdma_set_device_sysfs_group(&dd->verbs_dev.rdi.ibdev,
                                    &ib_hfi1_attr_group);
 
-       ret = rvt_register_device(&dd->verbs_dev.rdi, RDMA_DRIVER_HFI1);
+       ret = rvt_register_device(&dd->verbs_dev.rdi);
        if (ret)
                goto err_verbs_txreq;
 
index a6c5c67d0b8794ec08e08d5ac217160ed144f27a..dd408f8afe72d06c3c896e7a6d254467e1b80858 100644 (file)
@@ -414,6 +414,8 @@ static void hns_roce_unregister_device(struct hns_roce_dev *hr_dev)
 }
 
 static const struct ib_device_ops hns_roce_dev_ops = {
+       .driver_id = RDMA_DRIVER_HNS,
+
        .add_gid = hns_roce_add_gid,
        .alloc_pd = hns_roce_alloc_pd,
        .alloc_ucontext = hns_roce_alloc_ucontext,
@@ -536,7 +538,6 @@ static int hns_roce_register_device(struct hns_roce_dev *hr_dev)
                ib_set_device_ops(ib_dev, hr_dev->hw->hns_roce_dev_srq_ops);
        }
 
-       ib_dev->driver_id = RDMA_DRIVER_HNS;
        ib_set_device_ops(ib_dev, hr_dev->hw->hns_roce_dev_ops);
        ib_set_device_ops(ib_dev, &hns_roce_dev_ops);
        for (i = 0; i < hr_dev->caps.num_ports; i++) {
index a10a30d44b322ffc041761e8cda9c860726291e5..1979cefdf90cbe277cf731b37310aef1283f06ba 100644 (file)
@@ -2650,6 +2650,8 @@ static int i40iw_query_pkey(struct ib_device *ibdev,
 }
 
 static const struct ib_device_ops i40iw_dev_ops = {
+       .driver_id = RDMA_DRIVER_I40IW,
+
        .alloc_hw_stats = i40iw_alloc_hw_stats,
        .alloc_mr = i40iw_alloc_mr,
        .alloc_pd = i40iw_alloc_pd,
@@ -2787,7 +2789,6 @@ int i40iw_register_rdma_device(struct i40iw_device *iwdev)
                return -ENOMEM;
        iwibdev = iwdev->iwibdev;
        rdma_set_device_sysfs_group(&iwibdev->ibdev, &i40iw_attr_group);
-       iwibdev->ibdev.driver_id = RDMA_DRIVER_I40IW;
        ret = ib_register_device(&iwibdev->ibdev, "i40iw%d");
        if (ret)
                goto error;
index 25d09d53b51c429915d7e6f26b5981dc2d461896..03847e2f7835a3f07a12325276c1451c743d3cfe 100644 (file)
@@ -2509,6 +2509,8 @@ static void get_fw_ver_str(struct ib_device *device, char *str)
 }
 
 static const struct ib_device_ops mlx4_ib_dev_ops = {
+       .driver_id = RDMA_DRIVER_MLX4,
+
        .add_gid = mlx4_ib_add_gid,
        .alloc_mr = mlx4_ib_alloc_mr,
        .alloc_pd = mlx4_ib_alloc_pd,
@@ -2839,7 +2841,6 @@ static void *mlx4_ib_add(struct mlx4_dev *dev)
                goto err_steer_free_bitmap;
 
        rdma_set_device_sysfs_group(&ibdev->ib_dev, &mlx4_attr_group);
-       ibdev->ib_dev.driver_id = RDMA_DRIVER_MLX4;
        if (ib_register_device(&ibdev->ib_dev, "mlx4_%d"))
                goto err_diag_counters;
 
index abac70ad5c7c46db82856e7522059611470773de..abd416a31e7195390a9ea7b5656db5d3a52d951e 100644 (file)
@@ -6124,6 +6124,8 @@ static void mlx5_ib_stage_flow_db_cleanup(struct mlx5_ib_dev *dev)
 }
 
 static const struct ib_device_ops mlx5_ib_dev_ops = {
+       .driver_id = RDMA_DRIVER_MLX5,
+
        .add_gid = mlx5_ib_add_gid,
        .alloc_mr = mlx5_ib_alloc_mr,
        .alloc_pd = mlx5_ib_alloc_pd,
@@ -6290,7 +6292,6 @@ static int mlx5_ib_stage_caps_init(struct mlx5_ib_dev *dev)
        if (mlx5_accel_ipsec_device_caps(dev->mdev) &
            MLX5_ACCEL_IPSEC_CAP_DEVICE)
                ib_set_device_ops(&dev->ib_dev, &mlx5_ib_dev_flow_ipsec_ops);
-       dev->ib_dev.driver_id = RDMA_DRIVER_MLX5;
        ib_set_device_ops(&dev->ib_dev, &mlx5_ib_dev_ops);
 
        if (IS_ENABLED(CONFIG_INFINIBAND_USER_ACCESS))
index 4f40dfedf9208149a992a4e7c511c29dea9a4bcb..d6467da39aab55b85188fef37b24caeef26049d0 100644 (file)
@@ -1153,6 +1153,8 @@ static void get_dev_fw_str(struct ib_device *device, char *str)
 }
 
 static const struct ib_device_ops mthca_dev_ops = {
+       .driver_id = RDMA_DRIVER_MTHCA,
+
        .alloc_pd = mthca_alloc_pd,
        .alloc_ucontext = mthca_alloc_ucontext,
        .attach_mcast = mthca_multicast_attach,
@@ -1303,7 +1305,6 @@ int mthca_register_device(struct mthca_dev *dev)
        mutex_init(&dev->cap_mask_mutex);
 
        rdma_set_device_sysfs_group(&dev->ib_dev, &mthca_attr_group);
-       dev->ib_dev.driver_id = RDMA_DRIVER_MTHCA;
        ret = ib_register_device(&dev->ib_dev, "mthca%d");
        if (ret)
                return ret;
index fb2d0762c7c8205b6bde2fc68fbd84e8218ab3db..3c85e2ef5a080ab65402041e63de2a3b810faa17 100644 (file)
@@ -3558,6 +3558,8 @@ static void get_dev_fw_str(struct ib_device *dev, char *str)
 }
 
 static const struct ib_device_ops nes_dev_ops = {
+       .driver_id = RDMA_DRIVER_NES,
+
        .alloc_mr = nes_alloc_mr,
        .alloc_mw = nes_alloc_mw,
        .alloc_pd = nes_alloc_pd,
@@ -3722,7 +3724,6 @@ int nes_register_ofa_device(struct nes_ib_device *nesibdev)
        int ret;
 
        rdma_set_device_sysfs_group(&nesvnic->nesibdev->ibdev, &nes_attr_group);
-       nesvnic->nesibdev->ibdev.driver_id = RDMA_DRIVER_NES;
        ret = ib_register_device(&nesvnic->nesibdev->ibdev, "nes%d");
        if (ret) {
                return ret;
index fc6c0962dea987f40e49bd5e62af45625af9ae6f..a9da4b857566cc3438aa38f3ba3c85ec09a03561 100644 (file)
@@ -144,6 +144,8 @@ static const struct attribute_group ocrdma_attr_group = {
 };
 
 static const struct ib_device_ops ocrdma_dev_ops = {
+       .driver_id = RDMA_DRIVER_OCRDMA,
+
        .alloc_mr = ocrdma_alloc_mr,
        .alloc_pd = ocrdma_alloc_pd,
        .alloc_ucontext = ocrdma_alloc_ucontext,
@@ -249,7 +251,6 @@ static int ocrdma_register_device(struct ocrdma_dev *dev)
                ib_set_device_ops(&dev->ibdev, &ocrdma_dev_srq_ops);
        }
        rdma_set_device_sysfs_group(&dev->ibdev, &ocrdma_attr_group);
-       dev->ibdev.driver_id = RDMA_DRIVER_OCRDMA;
        ret = ib_device_set_netdev(&dev->ibdev, dev->nic_info.netdev, 1);
        if (ret)
                return ret;
index 083c2c00a8e917f81525606cd3764ad09f945a6a..737745231f8ffee5455fbceb507bf707bae05f61 100644 (file)
@@ -183,6 +183,8 @@ static void qedr_roce_register_device(struct qedr_dev *dev)
 }
 
 static const struct ib_device_ops qedr_dev_ops = {
+       .driver_id = RDMA_DRIVER_QEDR,
+
        .alloc_mr = qedr_alloc_mr,
        .alloc_pd = qedr_alloc_pd,
        .alloc_ucontext = qedr_alloc_ucontext,
@@ -274,7 +276,6 @@ static int qedr_register_device(struct qedr_dev *dev)
        rdma_set_device_sysfs_group(&dev->ibdev, &qedr_attr_group);
        ib_set_device_ops(&dev->ibdev, &qedr_dev_ops);
 
-       dev->ibdev.driver_id = RDMA_DRIVER_QEDR;
        rc = ib_device_set_netdev(&dev->ibdev, dev->ndev, 1);
        if (rc)
                return rc;
index 5ff32d32c61c86f9058a2a74c16f069eb3305809..bbc331d7f49bd8c010e44b051227119f8fe287e5 100644 (file)
@@ -1482,6 +1482,8 @@ static void qib_fill_device_attr(struct qib_devdata *dd)
 }
 
 static const struct ib_device_ops qib_dev_ops = {
+       .driver_id = RDMA_DRIVER_QIB,
+
        .init_port = qib_create_port_files,
        .modify_device = qib_modify_device,
        .process_mad = qib_process_mad,
@@ -1616,7 +1618,7 @@ int qib_register_ib_device(struct qib_devdata *dd)
        rdma_set_device_sysfs_group(&dd->verbs_dev.rdi.ibdev, &qib_attr_group);
 
        ib_set_device_ops(ibdev, &qib_dev_ops);
-       ret = rvt_register_device(&dd->verbs_dev.rdi, RDMA_DRIVER_QIB);
+       ret = rvt_register_device(&dd->verbs_dev.rdi);
        if (ret)
                goto err_tx;
 
index d88d9f8a7f9a312980987b51033ee37867410370..47830334cb555ddf63b4186355f5665e4c873e82 100644 (file)
@@ -329,6 +329,8 @@ static void usnic_get_dev_fw_str(struct ib_device *device, char *str)
 }
 
 static const struct ib_device_ops usnic_dev_ops = {
+       .driver_id = RDMA_DRIVER_USNIC,
+
        .alloc_pd = usnic_ib_alloc_pd,
        .alloc_ucontext = usnic_ib_alloc_ucontext,
        .create_cq = usnic_ib_create_cq,
@@ -412,7 +414,6 @@ static void *usnic_ib_device_add(struct pci_dev *dev)
 
        ib_set_device_ops(&us_ibdev->ib_dev, &usnic_dev_ops);
 
-       us_ibdev->ib_dev.driver_id = RDMA_DRIVER_USNIC;
        rdma_set_device_sysfs_group(&us_ibdev->ib_dev, &usnic_attr_group);
 
        ret = ib_device_set_netdev(&us_ibdev->ib_dev, us_ibdev->netdev, 1);
index 40182297f87fd5b0447b94c483382583337a4e77..54a0b63726295f137901ce8d482829af74fead0c 100644 (file)
@@ -144,6 +144,8 @@ static int pvrdma_port_immutable(struct ib_device *ibdev, u8 port_num,
 }
 
 static const struct ib_device_ops pvrdma_dev_ops = {
+       .driver_id = RDMA_DRIVER_VMW_PVRDMA,
+
        .add_gid = pvrdma_add_gid,
        .alloc_mr = pvrdma_alloc_mr,
        .alloc_pd = pvrdma_alloc_pd,
@@ -261,7 +263,6 @@ static int pvrdma_register_device(struct pvrdma_dev *dev)
                if (!dev->srq_tbl)
                        goto err_qp_free;
        }
-       dev->ib_dev.driver_id = RDMA_DRIVER_VMW_PVRDMA;
        ret = ib_device_set_netdev(&dev->ib_dev, dev->netdev, 1);
        if (ret)
                return ret;
index 9546a837a8ac41dce833d811af9534bce70908c9..60700e197e6c7987834f1a77d96c1f953707f9e3 100644 (file)
@@ -530,7 +530,7 @@ static noinline int check_support(struct rvt_dev_info *rdi, int verb)
  *
  * Return: 0 on success otherwise an errno.
  */
-int rvt_register_device(struct rvt_dev_info *rdi, u32 driver_id)
+int rvt_register_device(struct rvt_dev_info *rdi)
 {
        int ret = 0, i;
 
@@ -636,7 +636,6 @@ int rvt_register_device(struct rvt_dev_info *rdi, u32 driver_id)
        if (!rdi->ibdev.num_comp_vectors)
                rdi->ibdev.num_comp_vectors = 1;
 
-       rdi->ibdev.driver_id = driver_id;
        /* We are now good to announce we exist */
        ret = ib_register_device(&rdi->ibdev, dev_name(&rdi->ibdev.dev));
        if (ret) {
index 8c3e2a18cfe4072a7695297365d4241166487a55..3d3130dc6380bdd9e1f2e714c66f7b919d9e09f3 100644 (file)
@@ -1111,6 +1111,8 @@ static int rxe_enable_driver(struct ib_device *ib_dev)
 }
 
 static const struct ib_device_ops rxe_dev_ops = {
+       .driver_id = RDMA_DRIVER_RXE,
+
        .alloc_hw_stats = rxe_ib_alloc_hw_stats,
        .alloc_mr = rxe_alloc_mr,
        .alloc_pd = rxe_alloc_pd,
@@ -1230,7 +1232,6 @@ int rxe_register_device(struct rxe_dev *rxe, const char *ibdev_name)
        rxe->tfm = tfm;
 
        rdma_set_device_sysfs_group(dev, &rxe_attr_group);
-       dev->driver_id = RDMA_DRIVER_RXE;
        err = ib_register_device(dev, ibdev_name);
        if (err)
                pr_warn("%s failed with error %d\n", __func__, err);
index ec6446864b08e9847b35c5e68b6ac46018b52e26..dacf2b5ad8629de0233ed9f4e4b563fe28ef2d29 100644 (file)
@@ -2329,6 +2329,8 @@ struct iw_cm_conn_param;
  * need to define the supported operations, otherwise they will be set to null.
  */
 struct ib_device_ops {
+       enum rdma_driver_id driver_id;
+
        int (*post_send)(struct ib_qp *qp, const struct ib_send_wr *send_wr,
                         const struct ib_send_wr **bad_send_wr);
        int (*post_recv)(struct ib_qp *qp, const struct ib_recv_wr *recv_wr,
@@ -2672,7 +2674,6 @@ struct ib_device {
        struct rdma_restrack_root *res;
 
        const struct uapi_definition   *driver_def;
-       enum rdma_driver_id             driver_id;
 
        /*
         * Positive refcount indicates that the device is currently
index b9cd06db1a71e65b325ab0acea399419654c2cd8..997f42678806c8ddaaadd566e727c8208e85f63b 100644 (file)
@@ -555,7 +555,7 @@ static inline u16 rvt_get_pkey(struct rvt_dev_info *rdi,
 
 struct rvt_dev_info *rvt_alloc_device(size_t size, int nports);
 void rvt_dealloc_device(struct rvt_dev_info *rdi);
-int rvt_register_device(struct rvt_dev_info *rvd, u32 driver_id);
+int rvt_register_device(struct rvt_dev_info *rvd);
 void rvt_unregister_device(struct rvt_dev_info *rvd);
 int rvt_check_ah(struct ib_device *ibdev, struct rdma_ah_attr *ah_attr);
 int rvt_init_port(struct rvt_dev_info *rdi, struct rvt_ibport *port,