diff options
author | Devesh Sharma <devesh.sharma@emulex.com> | 2014-08-22 07:27:19 -0400 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2014-10-10 12:43:01 -0400 |
commit | 7ec11e0a14ae0a7a8fdce78860a70f25508de395 (patch) | |
tree | 81b12ce2a431428e22e3923d1d067984caa3292b /drivers/infiniband/hw/ocrdma | |
parent | fe82dcec644244676d55a1384c958d5f67979adb (diff) |
RDMA/ocrdma: Add default GID at index 0
Signed-off-by: Devesh Sharma <devesh.sharma@emulex.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw/ocrdma')
-rw-r--r-- | drivers/infiniband/hw/ocrdma/ocrdma_main.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_main.c b/drivers/infiniband/hw/ocrdma/ocrdma_main.c index 256a06bc0b68..cb7b52a791db 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_main.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_main.c | |||
@@ -388,6 +388,15 @@ static void ocrdma_remove_sysfiles(struct ocrdma_dev *dev) | |||
388 | device_remove_file(&dev->ibdev.dev, ocrdma_attributes[i]); | 388 | device_remove_file(&dev->ibdev.dev, ocrdma_attributes[i]); |
389 | } | 389 | } |
390 | 390 | ||
391 | static void ocrdma_add_default_sgid(struct ocrdma_dev *dev) | ||
392 | { | ||
393 | /* GID Index 0 - Invariant manufacturer-assigned EUI-64 */ | ||
394 | union ib_gid *sgid = &dev->sgid_tbl[0]; | ||
395 | |||
396 | sgid->global.subnet_prefix = cpu_to_be64(0xfe80000000000000LL); | ||
397 | ocrdma_get_guid(dev, &sgid->raw[8]); | ||
398 | } | ||
399 | |||
391 | static void ocrdma_init_ipv4_gids(struct ocrdma_dev *dev, | 400 | static void ocrdma_init_ipv4_gids(struct ocrdma_dev *dev, |
392 | struct net_device *net) | 401 | struct net_device *net) |
393 | { | 402 | { |
@@ -434,6 +443,7 @@ static void ocrdma_init_gid_table(struct ocrdma_dev *dev) | |||
434 | rdma_vlan_dev_real_dev(net_dev) : net_dev; | 443 | rdma_vlan_dev_real_dev(net_dev) : net_dev; |
435 | 444 | ||
436 | if (real_dev == dev->nic_info.netdev) { | 445 | if (real_dev == dev->nic_info.netdev) { |
446 | ocrdma_add_default_sgid(dev); | ||
437 | ocrdma_init_ipv4_gids(dev, net_dev); | 447 | ocrdma_init_ipv4_gids(dev, net_dev); |
438 | ocrdma_init_ipv6_gids(dev, net_dev); | 448 | ocrdma_init_ipv6_gids(dev, net_dev); |
439 | } | 449 | } |