From patchwork Tue Sep 19 16:17:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Salil Mehta X-Patchwork-Id: 113041 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp5107166qgf; Tue, 19 Sep 2017 09:20:24 -0700 (PDT) X-Google-Smtp-Source: AOwi7QDcsd+8Ud4p5JQtJmk8h5AFn0UYwMib5Ge//T5IjTgJgR6Yn2+x2YpT1dw77ukbVTgrzIQ9 X-Received: by 10.101.88.142 with SMTP id d14mr1811059pgu.36.1505838024354; Tue, 19 Sep 2017 09:20:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505838024; cv=none; d=google.com; s=arc-20160816; b=LDQlH7Is8t66FmdIIiz8P4jtg+3IiHye7Y9XgeTa6DQZRHEbnofmO2aNqlxtFAW8uM uHXecJWWqu4dwThuVKw5pG30aXE7I+LgIAWKRQgvW24ktzquG0mM3uKfc7bdXF7vCmNZ Mlm3POYjUJxPGZSF7GXykR7LYA20sw3yaVdIlflr5Ppuv9SNsCy3IDU4rtizeGSZsYLR vQxXrkhW5kS330M+eXHymIIpT0EC0mDcrrQj9BYtygp5GJTNSwspXsqzUOMJH0DmiTJq HuYGob6sPeufaoiONUll90bJ+uKP5hE/6T4TggA4knEF52/BVtz6ViaqFM0Jh6yU9SQe /NXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=/RDVVwM3aTM9Gax2/P4T07GX+NieQ3pjPzZNIfe0M5s=; b=sfMH+gYKkR+0pj5otlLZtzsF55Cy3k6d9AOzNp03NAiKdB0GCRI1iduZZYEDUSbW4P uvbQsMt/PD6+hbFM8L+vwCh69IeLMuU4ZhmtFsS4KU8O4MXQqApq7OErve3oKZBwKDPx wnJbEQ4x/GtWCYxDkMiNHt0TDn86M+lAO4X43SpkXDiiDYDdnhKMxj/V1nto1SX3YZvx oguRneGEzxs8udwIt/p1y1hQ/6M53NeH20aj167PEuQ3FHLo8HLYP4bkxWXDJKjb12Mx 6BOXjVmIDKVrLcNdr75Dowg3ICy4gLjxN38/pWz76Vjq5mlxM+eVL41B2fVpahY38kvv CgHw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g16si6767890pli.684.2017.09.19.09.20.24; Tue, 19 Sep 2017 09:20:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751789AbdISQUW (ORCPT + 26 others); Tue, 19 Sep 2017 12:20:22 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:6495 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751283AbdISQSH (ORCPT ); Tue, 19 Sep 2017 12:18:07 -0400 Received: from 172.30.72.59 (EHLO DGGEMS414-HUB.china.huawei.com) ([172.30.72.59]) by dggrg04-dlp.huawei.com (MOS 4.4.6-GA FastPath queued) with ESMTP id DHO40834; Wed, 20 Sep 2017 00:18:02 +0800 (CST) Received: from S00293818-DELL1.china.huawei.com (10.203.181.154) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.301.0; Wed, 20 Sep 2017 00:17:53 +0800 From: Salil Mehta To: CC: , , , , , , , Subject: [PATCH V2 net 1/7] net: hns3: Fixes initialization of phy address from firmware Date: Tue, 19 Sep 2017 17:17:10 +0100 Message-ID: <20170919161716.92680-2-salil.mehta@huawei.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20170919161716.92680-1-salil.mehta@huawei.com> References: <20170919161716.92680-1-salil.mehta@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.203.181.154] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020203.59C1433B.00FB, 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: 07123636b4c444578d769fb82f10c33d Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lipeng 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 Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 1 + 1 file changed, 1 insertion(+) -- 2.7.4 diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index bb45365..db4e07d 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;