summaryrefslogtreecommitdiff
path: root/mm/kasan/common.c
diff options
context:
space:
mode:
authorGuangbin Huang <huangguangbin2@huawei.com>2022-03-26 12:51:05 +0300
committerDavid S. Miller <davem@davemloft.net>2022-03-26 19:16:49 +0300
commitad0ecaef6a2c07e67ef9fe163c007f7b3dad8643 (patch)
tree379084c03ad5ac39bac6b45e11604cbd973e151a /mm/kasan/common.c
parent4d07c5936c2508ddd1cfd49b0a91d94cb4d1f0e8 (diff)
downloadlinux-ad0ecaef6a2c07e67ef9fe163c007f7b3dad8643.tar.xz
net: hns3: fix phy can not link up when autoneg off and reset
Currently, function hclge_mdio_read() will return 0 if during reset(the cmd state will be set to disable). If use general phy driver, the phy_state_machine() will update phy speed every second in function genphy_read_status_fixed() when PHY is set to autoneg off, no matter of link down or link up. If phy driver happens to read BMCR register during reset, phy speed will be updated to 10Mpbs as BMCR register value is 0. So it may call phy can not link up if previous speed is not 10Mpbs. To fix this problem, function hclge_mdio_read() should return -EBUSY if the cmd state is disable. So does function hclge_mdio_write(). Fixes: 1c1249380992 ("net: hns3: bugfix for hclge_mdio_write and hclge_mdio_read") Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'mm/kasan/common.c')
0 files changed, 0 insertions, 0 deletions