Return-Path: Received: from mail-wm0-f68.google.com ([74.125.82.68]:37268 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750826AbeCPVEv (ORCPT ); Fri, 16 Mar 2018 17:04:51 -0400 Received: by mail-wm0-f68.google.com with SMTP id 139so5421545wmn.2 for ; Fri, 16 Mar 2018 14:04:50 -0700 (PDT) From: Heiner Kallweit Subject: [PATCH RFC v2 0/7] net: phy: patch series aiming to improve few aspects of phylib To: Florian Fainelli , Andrew Lunn , Geert Uytterhoeven Cc: "netdev@vger.kernel.org" Message-ID: <6618f53c-778a-cb12-deb4-c618a728b43e@gmail.com> Date: Fri, 16 Mar 2018 22:04:42 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org List-ID: This patch series aims to tackle few issues with phylib: - address issues with patch series [1] (smsc911x + phylib changes) - make phy_stop synchronous - get rid of phy_start/stop_machine and handle it in phy_start/phy_stop - in mdio_suspend consider runtime pm state of mdio bus parent - consider more WOL conditions when deciding whether PHY is allowed to suspend - only resume phy after system suspend if needed [1] https://www.mail-archive.com/netdev@vger.kernel.org/msg196061.html It works fine here but other NIC drivers may use phylib differently. Therefore I'd appreciate feedback and more testing. I could think of some subsequent patches, e.g. phy_error() could be reduced to calling phy_stop() and printing an error message (today it silently sets the PHY state to PHY_HALTED). Changes in v2: - Incorporate review comments - Address error reported by Geert by changing phy_stop() to not trigger a linkwatch event. Heiner Kallweit (7): net: phy: unconditionally resume and re-enable interrupts in phy_start net: phy: improve checking for when PHY is allowed to suspend net: phy: resume PHY only if needed in mdio_bus_phy_suspend net: phy: remove phy_start_machine net: phy: make phy_stop synchronous net: phy: use new function phy_stop_suspending in mdio_bus_phy_suspend net: phy: remove phy_stop_machine drivers/net/phy/phy.c | 127 +++++++++++++++++++++---------------------- drivers/net/phy/phy_device.c | 77 ++++++++++++++++---------- drivers/net/phy/phylink.c | 1 - include/linux/phy.h | 3 +- 4 files changed, 112 insertions(+), 96 deletions(-) -- 2.16.2