IB/core: Pass hardware specific data in query_device
Vendors should be able to pass vendor specific data to/from user-space via query_device uverb. In order to do this, we need to pass the vendors' specific udata. Signed-off-by: Matan Barak <matanb@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:

committed by
Doug Ledford

parent
24306dc661
commit
2528e33e68
@@ -248,7 +248,8 @@ enum rdma_link_layer usnic_ib_port_link_layer(struct ib_device *device,
|
||||
}
|
||||
|
||||
int usnic_ib_query_device(struct ib_device *ibdev,
|
||||
struct ib_device_attr *props)
|
||||
struct ib_device_attr *props,
|
||||
struct ib_udata *uhw)
|
||||
{
|
||||
struct usnic_ib_dev *us_ibdev = to_usdev(ibdev);
|
||||
union ib_gid gid;
|
||||
@@ -257,6 +258,9 @@ int usnic_ib_query_device(struct ib_device *ibdev,
|
||||
int qp_per_vf;
|
||||
|
||||
usnic_dbg("\n");
|
||||
if (uhw->inlen || uhw->outlen)
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&us_ibdev->usdev_lock);
|
||||
us_ibdev->netdev->ethtool_ops->get_drvinfo(us_ibdev->netdev, &info);
|
||||
us_ibdev->netdev->ethtool_ops->get_settings(us_ibdev->netdev, &cmd);
|
||||
|
@@ -24,7 +24,8 @@
|
||||
enum rdma_link_layer usnic_ib_port_link_layer(struct ib_device *device,
|
||||
u8 port_num);
|
||||
int usnic_ib_query_device(struct ib_device *ibdev,
|
||||
struct ib_device_attr *props);
|
||||
struct ib_device_attr *props,
|
||||
struct ib_udata *uhw);
|
||||
int usnic_ib_query_port(struct ib_device *ibdev, u8 port,
|
||||
struct ib_port_attr *props);
|
||||
enum rdma_protocol_type
|
||||
|
Reference in New Issue
Block a user