net: hns3: Fix for fiber link up problem
authorYunsheng Lin <[email protected]>
Tue, 15 May 2018 18:20:12 +0000 (19:20 +0100)
committerDavid S. Miller <[email protected]>
Wed, 16 May 2018 15:33:08 +0000 (11:33 -0400)
commitbe8d8cdb8ebf3afd841c109dd035fd789a0c7d53
treeaeb0bcd87a019519d101ba12a49704cb6fed53b7
parent67bf2541f4b9a091e928d75eca544bca4c5db142
net: hns3: Fix for fiber link up problem

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 <[email protected]>
Signed-off-by: Peng Li <[email protected]>
Signed-off-by: Salil Mehta <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c