From mboxrd@z Thu Jan 1 00:00:00 1970 From: Florian Fainelli Subject: [PATCH RFT net-next 1/2] net: phy: Stop with excessive soft reset Date: Tue, 18 Sep 2018 18:35:04 -0700 Message-ID: <20180919013505.11347-2-f.fainelli@gmail.com> References: <20180919013505.11347-1-f.fainelli@gmail.com> Cc: Florian Fainelli , "David S. Miller" , Andrew Lunn , nbd@nbd.name, cphealy@gmail.com, harini.katakam@xilinx.com, afleming@freescale.com, agust@denx.de, arnd@arndb.de, asmirnov@ru.mvista.com, avi.kp.137@gmail.com, avorontsov@ru.mvista.com, baijiaju1990@gmail.com, benh@kernel.crashing.org, charles-antoine.couret@nexvision.fr, clemens.gruber@pqgruber.com, colin.king@canonical.com, cyril@ti.com, david.thomson@alliedtelesis.co.nz, ddaney@caviumnetworks.com, dongsheng.wang@hxt-semitech.com, dwmw2@infradead.org, eha@deif.com, houjingj@marvell.com, jeff@garzik.org, Jingju.Hou@synaptics.com, Jisheng.Zhang@synaptics.com, johan@kernel.org, Kapil.Juneja@freescale.com, kim.phillips@freescale.com, linyunsheng@huawei.com, madalin. To: netdev@vger.kernel.org Return-path: Received: from mail-ot1-f68.google.com ([209.85.210.68]:34286 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726887AbeISHLS (ORCPT ); Wed, 19 Sep 2018 03:11:18 -0400 Received: by mail-ot1-f68.google.com with SMTP id i12-v6so4109050otl.1 for ; Tue, 18 Sep 2018 18:35:57 -0700 (PDT) In-Reply-To: <20180919013505.11347-1-f.fainelli@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: 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 --- 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