IB/uverbs: Return link layer type to userspace for query port operation
authorEli Cohen <eli@mellanox.co.il>
Mon, 18 Oct 2010 21:45:20 +0000 (14:45 -0700)
committerRoland Dreier <rolandd@cisco.com>
Mon, 25 Oct 2010 17:20:39 +0000 (10:20 -0700)
Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/core/uverbs_cmd.c
include/rdma/ib_user_verbs.h

index 6fcfbeb24a234a419ec9313c956c7c4ba581bcf6..b342248aec059060e19f64ffd69ec28af256682a 100644 (file)
@@ -460,6 +460,8 @@ ssize_t ib_uverbs_query_port(struct ib_uverbs_file *file,
        resp.active_width    = attr.active_width;
        resp.active_speed    = attr.active_speed;
        resp.phys_state      = attr.phys_state;
+       resp.link_layer      = rdma_port_get_link_layer(file->device->ib_dev,
+                                                       cmd.port_num);
 
        if (copy_to_user((void __user *) (unsigned long) cmd.response,
                         &resp, sizeof resp))
index a17f77106149bb8ee63f02a8bdddf79f72a2c928..fe5b05177a2cb4fe9195cb2b95e4f1aca0242759 100644 (file)
@@ -205,7 +205,8 @@ struct ib_uverbs_query_port_resp {
        __u8  active_width;
        __u8  active_speed;
        __u8  phys_state;
-       __u8  reserved[3];
+       __u8  link_layer;
+       __u8  reserved[2];
 };
 
 struct ib_uverbs_alloc_pd {