net: hns: Add mac pcs config when enable|disable mac
authorYonglong Liu <liuyonglong@huawei.com>
Sat, 15 Dec 2018 03:53:28 +0000 (11:53 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Jan 2019 08:51:01 +0000 (09:51 +0100)
commit1f89e4e8b54d5bd85b1f80b8a3180b6206a6df68
treeba57509c12ce2daa34f350e2bb7559e395b6a00a
parentb686b8c073c06205774e3d4925638f506a7c398e
net: hns: Add mac pcs config when enable|disable mac

[ Upstream commit 726ae5c9e5f0c18eca8ea5296b526242c3e89822 ]

In some case, when mac enable|disable and adjust link, may cause hard to
link(or abnormal) between mac and phy. This patch adds the code for rx PCS
to avoid this bug.

Disable the rx PCS when driver disable the gmac, and enable the rx PCS
when driver enable the mac.

Signed-off-by: Yonglong Liu <liuyonglong@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c
drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h