From: oulijun Date: Wed, 10 Jan 2018 06:39:53 +0000 (+0800) Subject: RDMA/hns: Set the guid for hip08 RoCE device X-Git-Tag: Ubuntu-4.15.0-13.14~77 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=671d68f3dfee4d9a0d2541abe520b2a24e823e08;p=mirror_ubuntu-bionic-kernel.git RDMA/hns: Set the guid for hip08 RoCE device BugLink: http://bugs.launchpad.net/bugs/1756097 This patch assign a guid(Global Unique identifer) value to the hip08 device. Signed-off-by: Lijun Ou Signed-off-by: Yixian Liu Signed-off-by: Wei Hu (Xavier) Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe (cherry picked from commit d4994d2f1f7a7b24622f990d4bb437eacf69b816) Signed-off-by: Manoj Iyer Signed-off-by: Seth Forshee --- diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c index 11391c8ce6df..256fe110107a 100644 --- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include "hnae3.h" @@ -4679,6 +4680,9 @@ static int hns_roce_hw_v2_get_cfg(struct hns_roce_dev *hr_dev, hr_dev->iboe.netdevs[0] = handle->rinfo.netdev; hr_dev->iboe.phy_port[0] = 0; + addrconf_addr_eui48((u8 *)&hr_dev->ib_dev.node_guid, + hr_dev->iboe.netdevs[0]->dev_addr); + for (i = 0; i < HNS_ROCE_V2_MAX_IRQ_NUM; i++) hr_dev->irq[i] = pci_irq_vector(handle->pdev, i + handle->rinfo.base_vector);