From patchwork Wed Mar 15 13:51:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 95348 Delivered-To: patch@linaro.org Received: by 10.140.89.134 with SMTP id v6csp338915qgd; Wed, 15 Mar 2017 06:53:31 -0700 (PDT) X-Received: by 10.98.15.200 with SMTP id 69mr3986390pfp.100.1489586011825; Wed, 15 Mar 2017 06:53:31 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m12si2156486pgc.341.2017.03.15.06.53.31; Wed, 15 Mar 2017 06:53:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753786AbdCONw3 (ORCPT + 25 others); Wed, 15 Mar 2017 09:52:29 -0400 Received: from fllnx210.ext.ti.com ([198.47.19.17]:16386 "EHLO fllnx210.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751642AbdCONvp (ORCPT ); Wed, 15 Mar 2017 09:51:45 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id v2FDpYfP006873; Wed, 15 Mar 2017 08:51:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1489585894; bh=ATgvpT2mQILLadDD7n6eNMCIunANDOSLPCip9OmmU+c=; h=From:To:CC:Subject:Date; b=KoGhS/FqotmVz2xCpZ8Qi4240exPLxkZUJdeAx17sbk5WBC7zQWm3ToPflNVSNnxW jagLWk8q9z8l5PFOfY1kSWxi8ieVF/OIOPdH+xZS9wwjFdoJuCSz+pPL1BJxFTJOs8 yd/Oo7mSI0XqqrlugugXQbRg8dxBtKYXs8c7bnkI= Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v2FDpYmC003331; Wed, 15 Mar 2017 08:51:34 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.294.0; Wed, 15 Mar 2017 08:51:33 -0500 Received: from lta0400828d.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id v2FDpV3j009682; Wed, 15 Mar 2017 08:51:32 -0500 From: Roger Quadros To: , CC: , , , , Roger Quadros Subject: [RFC PATCH] net: phy: Don't miss phy_suspend() on PHY_HALTED for PHYs with interrupts Date: Wed, 15 Mar 2017 15:51:27 +0200 Message-ID: <1489585887-8683-1-git-send-email-rogerq@ti.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since commit 3c293f4e08b5 ("net: phy: Trigger state machine on state change and not polling.") phy_suspend() doesn't get called as part of phy_stop() for PHYs using interrupts because the phy state machine is never triggered after a phy_stop(). Explicitly trigger the PHY state machine so that it can see the new PHY state (HALTED) and suspend the PHY. Signed-off-by: Roger Quadros --- drivers/net/phy/phy.c | 1 + 1 file changed, 1 insertion(+) -- 2.7.4 Reviewed-by: Andrew Lunn diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 1be69d8..8fef03b 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -903,6 +903,7 @@ void phy_stop(struct phy_device *phydev) * of rtnl_lock(), but PHY_HALTED shall guarantee phy_change() * will not reenable interrupts. */ + phy_trigger_machine(phydev, true); } EXPORT_SYMBOL(phy_stop);