]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: hns3: Fix for fiber link up problem
authorYunsheng Lin <linyunsheng@huawei.com>
Tue, 15 May 2018 18:20:12 +0000 (19:20 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Aug 2018 05:47:50 +0000 (07:47 +0200)
commit8b7ba81e08a5fcf1b7e5132dceac4518112d0da4
tree32a22625a9194a9b5555a9c5c6af79e706612cdf
parent92a5d5d44aeb7e4c28457632dd703931a46cd903
net: hns3: Fix for fiber link up problem

[ Upstream commit be8d8cdb8ebf3afd841c109dd035fd789a0c7d53 ]

When hclge_ae_start is called, hdev->hw.mac.link may be set
to one after up/down multi-times, which does not correspond to
the link state of netdev when the netdev is up.

This fixes it by setting hdev->hw.mac.link to zero when
hclge_ae_start is called.

Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support")
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c