RDMA/addr: Use time_after_eq() instead of time_after() in queue_req()
[powerpc.git] / drivers / infiniband / core / ucm.c
index 67caf36..ad4f4d5 100644 (file)
@@ -309,9 +309,9 @@ static int ib_ucm_event_process(struct ib_cm_event *evt,
                info          = evt->param.apr_rcvd.apr_info;
                break;
        case IB_CM_SIDR_REQ_RECEIVED:
-               uvt->resp.u.sidr_req_resp.pkey = 
+               uvt->resp.u.sidr_req_resp.pkey =
                                        evt->param.sidr_req_rcvd.pkey;
-               uvt->resp.u.sidr_req_resp.port = 
+               uvt->resp.u.sidr_req_resp.port =
                                        evt->param.sidr_req_rcvd.port;
                uvt->data_len = IB_CM_SIDR_REQ_PRIVATE_DATA_SIZE;
                break;
@@ -1044,7 +1044,6 @@ static ssize_t ib_ucm_send_sidr_req(struct ib_ucm_file *file,
        param.service_id       = cmd.sid;
        param.timeout_ms       = cmd.timeout;
        param.max_cm_retries   = cmd.max_cm_retries;
-       param.pkey             = cmd.pkey;
 
        ctx = ib_ucm_ctx_get(file, cmd.id);
        if (!IS_ERR(ctx)) {
@@ -1238,7 +1237,7 @@ static struct class ucm_class = {
 static ssize_t show_ibdev(struct class_device *class_dev, char *buf)
 {
        struct ib_ucm_device *dev;
-       
+
        dev = container_of(class_dev, struct ib_ucm_device, class_dev);
        return sprintf(buf, "%s\n", dev->ib_dev->name);
 }
@@ -1248,7 +1247,8 @@ static void ib_ucm_add_one(struct ib_device *device)
 {
        struct ib_ucm_device *ucm_dev;
 
-       if (!device->alloc_ucontext)
+       if (!device->alloc_ucontext ||
+           rdma_node_get_transport(device->node_type) != RDMA_TRANSPORT_IB)
                return;
 
        ucm_dev = kzalloc(sizeof *ucm_dev, GFP_KERNEL);