Skip to content

Commit d4994d2

Browse files
oulijunjgunthorpe
authored andcommitted
RDMA/hns: Set the guid for hip08 RoCE device
This patch assign a guid(Global Unique identifer) value to the hip08 device. Signed-off-by: Lijun Ou <[email protected]> Signed-off-by: Yixian Liu <[email protected]> Signed-off-by: Wei Hu (Xavier) <[email protected]> Reviewed-by: Leon Romanovsky <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 2eade67 commit d4994d2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/infiniband/hw/hns/hns_roce_hw_v2.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#include <linux/etherdevice.h>
3535
#include <linux/interrupt.h>
3636
#include <linux/kernel.h>
37+
#include <net/addrconf.h>
3738
#include <rdma/ib_umem.h>
3839

3940
#include "hnae3.h"
@@ -4679,6 +4680,9 @@ static int hns_roce_hw_v2_get_cfg(struct hns_roce_dev *hr_dev,
46794680
hr_dev->iboe.netdevs[0] = handle->rinfo.netdev;
46804681
hr_dev->iboe.phy_port[0] = 0;
46814682

4683+
addrconf_addr_eui48((u8 *)&hr_dev->ib_dev.node_guid,
4684+
hr_dev->iboe.netdevs[0]->dev_addr);
4685+
46824686
for (i = 0; i < HNS_ROCE_V2_MAX_IRQ_NUM; i++)
46834687
hr_dev->irq[i] = pci_irq_vector(handle->pdev,
46844688
i + handle->rinfo.base_vector);

0 commit comments

Comments
 (0)