aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mlx4/alias_GUID.c
diff options
context:
space:
mode:
authorYishai Hadas <yishaih@mellanox.com>2015-03-01 11:17:22 -0500
committerDoug Ledford <dledford@redhat.com>2015-04-15 15:51:50 -0400
commit2350f24774627d73fe2e3843172b69db91714cd2 (patch)
tree87e290665417cc6ffa097ed5bd0350650e11d9bd /drivers/infiniband/hw/mlx4/alias_GUID.c
parentfb517a4f03041c5eaed394bd57ee518b44301f1a (diff)
IB/mlx4: Manage admin alias GUID upon admin request
Set the admin alias GUID per the administrator's request via the sysfs mechanism into the core layer. The "get" request returns the current value. However, if the administrator requests the SM to assign a new value by requesting 0, the SM assigned GUID is returned. Signed-off-by: Yishai Hadas <yishaih@mellanox.com> Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.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.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mlx4/alias_GUID.c b/drivers/infiniband/hw/mlx4/alias_GUID.c
index a968388b8176..e4edd73f79b9 100644
--- a/drivers/infiniband/hw/mlx4/alias_GUID.c
+++ b/drivers/infiniband/hw/mlx4/alias_GUID.c
@@ -328,6 +328,12 @@ static void aliasguid_query_handler(int status,
328 } else { 328 } else {
329 *(__be64 *)&rec->all_recs[i * GUID_REC_SIZE] = 329 *(__be64 *)&rec->all_recs[i * GUID_REC_SIZE] =
330 sm_response; 330 sm_response;
331 if (required_val == 0)
332 mlx4_set_admin_guid(dev->dev,
333 sm_response,
334 (guid_rec->block_num
335 * NUM_ALIAS_GUID_IN_REC) + i,
336 cb_ctx->port);
331 goto next_entry; 337 goto next_entry;
332 } 338 }
333 } 339 }