Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S938611AbdDSSWc (ORCPT ); Wed, 19 Apr 2017 14:22:32 -0400 Received: from mail-lf0-f42.google.com ([209.85.215.42]:32812 "EHLO mail-lf0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1765933AbdDSSWa (ORCPT ); Wed, 19 Apr 2017 14:22:30 -0400 Subject: Re: [PATCH] net: arc_emac: switch to phy_start()/phy_stop() To: Alexander Kochetkov , "David S. Miller" , Philippe Reynes , Peter Chen , Wei Yongjun , netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <1492612195-16601-1-git-send-email-al.kochet@gmail.com> From: Sergei Shtylyov Organization: Cogent Embedded Message-ID: Date: Wed, 19 Apr 2017 21:22:26 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <1492612195-16601-1-git-send-email-al.kochet@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1037 Lines: 36 On 04/19/2017 05:29 PM, Alexander Kochetkov wrote: > The patch replace phy_start_aneg() with phy_start(). phy_start() call Replaces. > phy_start_aneg() as a part of startup sequence and allow recover from > error (PHY_HALTED) state. > > Also added call phy_stop() to arc_emac_remove() to stop PHY state machine To arc_emac_stop() maybe? > when MAC is down. > Signed-off-by: Alexander Kochetkov > --- > drivers/net/ethernet/arc/emac_main.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/arc/emac_main.c b/drivers/net/ethernet/arc/emac_main.c > index abc9f2a..188676d 100644 > --- a/drivers/net/ethernet/arc/emac_main.c > +++ b/drivers/net/ethernet/arc/emac_main.c [...] > @@ -556,6 +556,8 @@ static int arc_emac_stop(struct net_device *ndev) > napi_disable(&priv->napi); > netif_stop_queue(ndev); > > + phy_stop(ndev->phydev); > + > /* Disable interrupts */ > arc_reg_clr(priv, R_ENABLE, RXINT_MASK | TXINT_MASK | ERR_MASK); > MBR, Sergei