linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Huazhong Tan <tanhuazhong@huawei.com>
To: <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<salil.mehta@huawei.com>, <yisen.zhuang@huawei.com>,
	<linuxarm@huawei.com>, Jian Shen <shenjian15@huawei.com>,
	Peng Li <lipeng321@huawei.com>,
	"Huazhong Tan" <tanhuazhong@huawei.com>
Subject: [PATCH net-next 3/9] net: hns3: fix port capbility updating issue
Date: Thu, 4 Jul 2019 22:04:22 +0800	[thread overview]
Message-ID: <1562249068-40176-4-git-send-email-tanhuazhong@huawei.com> (raw)
In-Reply-To: <1562249068-40176-1-git-send-email-tanhuazhong@huawei.com>

From: Jian Shen <shenjian15@huawei.com>

Currently, the driver queries the media port information, and
updates the port capability periodically. But it sets an error
mac->speed_type value, which stops update port capability.

Fixes: 88d10bd6f730 ("net: hns3: add support for multiple media type")
Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
---
 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 2ecc10a..94c94e1 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
@@ -2663,6 +2663,7 @@ static int hclge_get_sfp_info(struct hclge_dev *hdev, struct hclge_mac *mac)
 		mac->speed_ability = le32_to_cpu(resp->speed_ability);
 		mac->autoneg = resp->autoneg;
 		mac->support_autoneg = resp->autoneg_ability;
+		mac->speed_type = QUERY_ACTIVE_SPEED;
 		if (!resp->active_fec)
 			mac->fec_mode = 0;
 		else
-- 
2.7.4


  parent reply	other threads:[~2019-07-04 14:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-04 14:04 [PATCH net-next 0/9] net: hns3: some cleanups & bugfixes Huazhong Tan
2019-07-04 14:04 ` [PATCH net-next 1/9] net: hns3: enable broadcast promisc mode when initializing VF Huazhong Tan
2019-07-04 14:04 ` [PATCH net-next 2/9] net: hns3: fix flow control configure issue for fibre port Huazhong Tan
2019-07-04 14:04 ` Huazhong Tan [this message]
2019-07-04 14:04 ` [PATCH net-next 4/9] net: hns3: add all IMP return code Huazhong Tan
2019-07-04 14:04 ` [PATCH net-next 5/9] net: hns3: set default value for param "type" in hclgevf_bind_ring_to_vector Huazhong Tan
2019-07-04 14:04 ` [PATCH net-next 6/9] net: hns3: check msg_data before memcpy in hclgevf_send_mbx_msg Huazhong Tan
2019-07-04 14:04 ` [PATCH net-next 7/9] net: hns3: add default value for tc_size and tc_offset Huazhong Tan
2019-07-04 14:04 ` [PATCH net-next 8/9] net: hns3: bitwise operator should use unsigned type Huazhong Tan
2019-07-04 14:04 ` [PATCH net-next 9/9] net: hns3: set maximum length to resp_data_len for exceptional case Huazhong Tan
2019-07-04 22:13 ` [PATCH net-next 0/9] net: hns3: some cleanups & bugfixes Jakub Kicinski
2019-07-05 22:39 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1562249068-40176-4-git-send-email-tanhuazhong@huawei.com \
    --to=tanhuazhong@huawei.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=lipeng321@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=salil.mehta@huawei.com \
    --cc=shenjian15@huawei.com \
    --cc=yisen.zhuang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).