summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorLipeng <lipeng321@huawei.com>2017-09-19 19:17:10 +0300
committerDavid S. Miller <davem@davemloft.net>2017-09-20 02:06:49 +0300
commit2a4776e14f7da3d48fffb4edbb82355742f23478 (patch)
tree9dffa24ecd0ee706c2865b93f48edb03c598ca2d /drivers/net
parent930651a75bf1ba6893a8b8475270664ebdb6cf4a (diff)
downloadlinux-2a4776e14f7da3d48fffb4edbb82355742f23478.tar.xz
net: hns3: Fixes initialization of phy address from firmware
Default phy address of every port is 0. Therefore, phy address for each port need to be fetched from firmware and device initialized with fetched non-default phy address. Fixes: 6427264ef330 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Lipeng <lipeng321@huawei.com> Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
index bb45365fb817..db4e07dac29a 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
@@ -1066,6 +1066,7 @@ static int hclge_configure(struct hclge_dev *hdev)
for (i = 0; i < ETH_ALEN; i++)
hdev->hw.mac.mac_addr[i] = cfg.mac_addr[i];
hdev->hw.mac.media_type = cfg.media_type;
+ hdev->hw.mac.phy_addr = cfg.phy_addr;
hdev->num_desc = cfg.tqp_desc_num;
hdev->tm_info.num_pg = 1;
hdev->tm_info.num_tc = cfg.tc_num;