aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mlx4/alias_GUID.c
diff options
context:
space:
mode:
authorOr Gerlitz <ogerlitz@mellanox.com>2017-01-24 06:02:39 -0500
committerDoug Ledford <dledford@redhat.com>2017-02-14 11:41:22 -0500
commitc4550c63b363914071d63a36e5bedcfe22057940 (patch)
tree2074d5ce0787e36c6aa6c6832c755544dd43c9a9 /drivers/infiniband/hw/mlx4/alias_GUID.c
parentce1e055fb9aba56c80d84f63edfa102691f63d41 (diff)
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/mlx4/alias_GUID.c')
-rw-r--r--drivers/infiniband/hw/mlx4/alias_GUID.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mlx4/alias_GUID.c b/drivers/infiniband/hw/mlx4/alias_GUID.c
index 06020c54db20..ea24230ea0d4 100644
--- a/drivers/infiniband/hw/mlx4/alias_GUID.c
+++ b/drivers/infiniband/hw/mlx4/alias_GUID.c
@@ -499,6 +499,7 @@ static int set_guid_rec(struct ib_device *ibdev,
499 struct list_head *head = 499 struct list_head *head =
500 &dev->sriov.alias_guid.ports_guid[port - 1].cb_list; 500 &dev->sriov.alias_guid.ports_guid[port - 1].cb_list;
501 501
502 memset(&attr, 0, sizeof(attr));
502 err = __mlx4_ib_query_port(ibdev, port, &attr, 1); 503 err = __mlx4_ib_query_port(ibdev, port, &attr, 1);
503 if (err) { 504 if (err) {
504 pr_debug("mlx4_ib_query_port failed (err: %d), port: %d\n", 505 pr_debug("mlx4_ib_query_port failed (err: %d), port: %d\n",