Commit 7d13e6f2 authored by Florian Fainelli's avatar Florian Fainelli Committed by Xie XiuQi
Browse files

net: phy: Stop with excessive soft reset



mainline inclusion
from mainline-4.20
commit 6e2d85ec
category: bugfix
bugzilla: 6040
CVE: NA

-------------------------------------------------

While consolidating the PHY reset in phy_init_hw() an unconditionaly
BMCR soft-reset I became quite trigger happy with those. This was later
on deactivated for the Generic PHY driver on the premise that a prior
software entity (e.g: bootloader) might have applied workarounds in
commit 0878fff1 ("net: phy: Do not perform software reset for
Generic PHY").

Since we have a hook to wire-up a soft_reset callback, just use that and
get rid of the call to genphy_soft_reset() entirely. This speeds up
initialization and link establishment for most PHYs out there that do
not require a reset.

Fixes: 87aa9f9c ("net: phy: consolidate PHY reset in phy_init_hw()")
Tested-by: default avatarWang, Dongsheng <dongsheng.wang@hxt-semitech.com>
Tested-by: default avatarChris Healy <cphealy@gmail.com>
Tested-by: default avatarAndrew Lunn <andrew@lunn.ch>
Tested-by: default avatarClemens Gruber <clemens.gruber@pqgruber.com>
Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Reviewed-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 84158a1d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment