lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180919013505.11347-2-f.fainelli@gmail.com>
Date:   Tue, 18 Sep 2018 18:35:04 -0700
From:   Florian Fainelli <f.fainelli@...il.com>
To:     netdev@...r.kernel.org
Cc:     Florian Fainelli <f.fainelli@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Andrew Lunn <andrew@...n.ch>, nbd@....name, cphealy@...il.com,
        harini.katakam@...inx.com, afleming@...escale.com, agust@...x.de,
        arnd@...db.de, asmirnov@...mvista.com, avi.kp.137@...il.com,
        avorontsov@...mvista.com, baijiaju1990@...il.com,
        benh@...nel.crashing.org, charles-antoine.couret@...vision.fr,
        clemens.gruber@...ruber.com, colin.king@...onical.com,
        cyril@...com, david.thomson@...iedtelesis.co.nz,
        ddaney@...iumnetworks.com, dongsheng.wang@...-semitech.com,
        dwmw2@...radead.org, eha@...f.com, houjingj@...vell.com,
        jeff@...zik.org, Jingju.Hou@...aptics.com,
        Jisheng.Zhang@...aptics.com, johan@...nel.org,
        Kapil.Juneja@...escale.com, kim.phillips@...escale.com,
        linyunsheng@...wei.com, madalin.bucur@...escale.com,
        michael@...pelberg.de, michal.simek@...inx.com, olof@...om.net,
        qiang.zhao@....com, Raju.Lakkaraju@...rosemi.com,
        rmk+kernel@...linux.org.uk, ron_madrid@...global.net,
        sebastian.hesselbarth@...il.com, sposelenov@...raft.com,
        sr@...x.de, torvalds@...ux-foundation.org,
        u.kleine-koenig@...gutronix.de, vndao@...era.com,
        Yu.Liu@...escale.com
Subject: [PATCH RFT net-next 1/2] net: phy: Stop with excessive soft reset

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 0878fff1f42c ("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: 87aa9f9c61ad ("net: phy: consolidate PHY reset in phy_init_hw()")
Signed-off-by: Florian Fainelli <f.fainelli@...il.com>
---
 drivers/net/phy/phy_device.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index db1172db1e7c..9216d2f8e41e 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -880,8 +880,6 @@ int phy_init_hw(struct phy_device *phydev)
 
 	if (phydev->drv->soft_reset)
 		ret = phydev->drv->soft_reset(phydev);
-	else
-		ret = genphy_soft_reset(phydev);
 
 	if (ret < 0)
 		return ret;
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ