Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964977AbdDZSgM (ORCPT ); Wed, 26 Apr 2017 14:36:12 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:59146 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964936AbdDZSgF (ORCPT ); Wed, 26 Apr 2017 14:36:05 -0400 Date: Wed, 26 Apr 2017 14:36:00 -0400 (EDT) Message-Id: <20170426.143600.2106204643264382419.davem@davemloft.net> To: al.kochet@gmail.com Cc: f.fainelli@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, sergei.shtylyov@cogentembedded.com, rogerq@ti.com, madalin.bucur@nxp.com Subject: Re: [PATCH v1] net: phy: fix auto-negotiation stall due to unavailable interrupt From: David Miller In-Reply-To: <1492686004-30527-2-git-send-email-al.kochet@gmail.com> References: <1492686004-30527-1-git-send-email-al.kochet@gmail.com> <1492686004-30527-2-git-send-email-al.kochet@gmail.com> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Wed, 26 Apr 2017 10:54:40 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1185 Lines: 24 From: Alexander Kochetkov Date: Thu, 20 Apr 2017 14:00:04 +0300 > The Ethernet link on an interrupt driven PHY was not coming up if the Ethernet > cable was plugged before the Ethernet interface was brought up. > > The patch trigger PHY state machine to update link state if PHY was requested to > do auto-negotiation and auto-negotiation complete flag already set. > > During power-up cycle the PHY do auto-negotiation, generate interrupt and set > auto-negotiation complete flag. Interrupt is handled by PHY state machine but > doesn't update link state because PHY is in PHY_READY state. After some time > MAC bring up, start and request PHY to do auto-negotiation. If there are no new > settings to advertise genphy_config_aneg() doesn't start PHY auto-negotiation. > PHY continue to stay in auto-negotiation complete state and doesn't fire > interrupt. At the same time PHY state machine expect that PHY started > auto-negotiation and is waiting for interrupt from PHY and it won't get it. > > Signed-off-by: Alexander Kochetkov > Cc: stable # v4.9+ Applied, and I reverted the micrel commit too. Thanks.