Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934128AbcJLU0X (ORCPT ); Wed, 12 Oct 2016 16:26:23 -0400 Received: from vps0.lunn.ch ([178.209.37.122]:44293 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932566AbcJLU0S (ORCPT ); Wed, 12 Oct 2016 16:26:18 -0400 Date: Wed, 12 Oct 2016 21:55:00 +0200 From: Andrew Lunn To: Kyle Roeschley Cc: Florian Fainelli , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC] net: phy: smsc: Disable auto-negotiation on startup Message-ID: <20161012195500.GA13125@lunn.ch> References: <20161010174123.21436-1-kyle.roeschley@ni.com> <0c2488d0-45f5-1ab7-bfa5-f19ae687a90f@gmail.com> <20161012150533.dctakcjczclk2mml@senary> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161012150533.dctakcjczclk2mml@senary> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1295 Lines: 30 On Wed, Oct 12, 2016 at 10:05:33AM -0500, Kyle Roeschley wrote: > On Wed, Oct 12, 2016 at 02:13:06AM -0700, Florian Fainelli wrote: > > On 10/10/2016 10:41 AM, Kyle Roeschley wrote: > > > Because the SMSC PHY completes auto-negotiation before the driver is > > > ready to handle interrupts, the PHY state machine never realizes that we > > > have a link. Clear the ANENABLE bit on initialization, which lets > > > genphy_config_aneg do its thing when that code is hit later. > > > > > > While this patch does fix the problem we see (no link on boot without > > > re-plugging the cable), it seems like the generic PHY code should be > > > able to handle auto-negotiation completing before interrupts are > > > enabled. Submitted as an RFC in the hopes that someone has an idea as to > > > how that could be done. > > > > > > This fix is copied from commit 99f81afc139c ("phy: micrel: Disable auto > > > negotiation on startup"). > > > > Do you mind trying: > > > > https://www.spinics.net/lists/netdev/msg397857.html > > > > and see if you do get link interrupts without your patch applied? Thanks! > > Yep, that fixes it. I figured there was some state machine issue I was missing. > Thanks very much! Humm, O.K, time to pull that patch out of the series and make it standalone. Andrew