diff options
author | Or Gerlitz <ogerlitz@mellanox.com> | 2017-01-24 14:02:39 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-02-14 19:41:22 +0300 |
commit | c4550c63b363914071d63a36e5bedcfe22057940 (patch) | |
tree | 2074d5ce0787e36c6aa6c6832c755544dd43c9a9 /drivers/infiniband/hw/mlx5/mad.c | |
parent | ce1e055fb9aba56c80d84f63edfa102691f63d41 (diff) | |
download | linux-c4550c63b363914071d63a36e5bedcfe22057940.tar.xz |
IB: Query ports via the core instead of direct into the driver
Change the drivers to call ib_query_port in their get port
immutable handler instead of their own query port handler.
Doing this required to set the core cap flags of this device
before the ib_query_port call is made, since the IB core might
need these caps to serve the port query.
Drivers are ensured by the IB core that the port attributes passed
to the port query verb implementation are zero, and hence we
removed the zeroing from the drivers.
This patch doesn't add any new functionality.
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Reviewed-by: Steve Wise <swise@opengridcomputing.com>
Acked-by: Adit Ranadive <aditr@vmware.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx5/mad.c')
-rw-r--r-- | drivers/infiniband/hw/mlx5/mad.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx5/mad.c b/drivers/infiniband/hw/mlx5/mad.c index af962e7fdc3a..8dacb49eabd9 100644 --- a/drivers/infiniband/hw/mlx5/mad.c +++ b/drivers/infiniband/hw/mlx5/mad.c @@ -527,7 +527,7 @@ int mlx5_query_mad_ifc_port(struct ib_device *ibdev, u8 port, if (!in_mad || !out_mad) goto out; - memset(props, 0, sizeof(*props)); + /* props being zeroed by the caller, avoid zeroing it here */ init_query_mad(in_mad); in_mad->attr_id = IB_SMP_ATTR_PORT_INFO; |