Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2420b60b authored by Eli Cohen's avatar Eli Cohen Committed by Roland Dreier
Browse files

IB/uverbs: Return link layer type to userspace for query port operation



Signed-off-by: default avatarEli Cohen <eli@mellanox.co.il>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent ff7f5aab
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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))
+2 −1
Original line number Diff line number Diff line
@@ -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 {