Path: csiph.com!aioe.org!bofh.it!news.nic.it!robomod From: Salil Mehta Newsgroups: linux.kernel Subject: [PATCH net 1/7] net: hns3: get phy addr from NCL_config Date: Tue, 19 Sep 2017 03:10:01 +0200 Message-ID: References: X-Mailer: git-send-email 2.8.3 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.47.92.71] X-Cfilter-Loop: Reflected X-Mirapoint-Virus-Rapid-Raw: score=unknown(0), refid=str=0001.0A020203.59C06DDD.01BB,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-ID: 5655954c9c8ac429b7267239b2a7bd24 Sender: robomod@news.nic.it List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Approved: robomod@news.nic.it Lines: 27 Organization: linux.* mail to news gateway X-Original-Cc: , , , , , , , X-Original-Date: Tue, 19 Sep 2017 02:06:22 +0100 X-Original-Message-ID: <20170919010628.175732-2-salil.mehta@huawei.com> X-Original-References: <20170919010628.175732-1-salil.mehta@huawei.com> X-Original-Sender: linux-kernel-owner@vger.kernel.org Xref: csiph.com linux.kernel:1734579 From: Lipeng NCL_config file defines phy address for every port. Driver should get phy address from NCL_config file.If do not get the right phy address, every port will use the default phy address 0, different port use the same phy address will cause error. Signed-off-by: Lipeng Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 1 + 1 file changed, 1 insertion(+) 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; -- 2.11.0