From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8074EC282C3 for ; Tue, 22 Jan 2019 22:36:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 40F2120866 for ; Tue, 22 Jan 2019 22:36:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="h4MMamll" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726979AbfAVWgz (ORCPT ); Tue, 22 Jan 2019 17:36:55 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:52110 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726178AbfAVWgz (ORCPT ); Tue, 22 Jan 2019 17:36:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=3/oWR3dD3yMIRY4xDJb89HNWKD8Ho8MQ8XLf2r4az8k=; b=h4MMamllzMc7UWJz1vsWJQh00ahAk1BP/yI+6pk/BkZ+N+NaWTFLwY/oBtV1OpVImVghUUDVq9bda75ZSLEvCA04Jz1dIXZN9XPOheN/dwHE8lxZ6G1NhYqgmFomCMn+hvPHHX7JpDRcEdTdq4jfHXHm/0l7pVebBRLcTmPjxD4=; Received: from andrew by vps0.lunn.ch with local (Exim 4.84_2) (envelope-from ) id 1gm4f3-00054L-Fi; Tue, 22 Jan 2019 23:36:49 +0100 Date: Tue, 22 Jan 2019 23:36:49 +0100 From: Andrew Lunn To: John David Anglin Cc: Russell King , Vivien Didelot , Florian Fainelli , netdev@vger.kernel.org Subject: Re: net: phylink: dsa: mv88e6xxx: flaky link detection on switch ports with internal PHYs Message-ID: <20190122223649.GD3634@lunn.ch> References: <49eec816-9238-c893-0860-602aa8965515@bell.net> <20190122202834.GB12052@lunn.ch> <09fce2e0-9dd2-ea30-7e7d-72f04eede68b@bell.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <09fce2e0-9dd2-ea30-7e7d-72f04eede68b@bell.net> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, Jan 22, 2019 at 04:40:27PM -0500, John David Anglin wrote: > Hi Andrew, > > On 1/22/2019 3:28 PM, Andrew Lunn wrote: > >Does it make a difference if you do it by hand? Bring up the master > >interface, wan, lan0, lan1, add any bridge you need, etc. > > > >> From power on, none of the wan, lan0, lan1 or br0 achieve link > >>(LOWER_UP). > I can explore this but I don't know at the moment.  I believe that all > interfaces are configured. Hi John In what order? The master interface has to be up first before any slave interface is configured up. > In serdes.c, interrupts are used to monitor link changes.  However, phy.c > doesn't do this and > it doesn't call phylink_mac_change(). It does not need to. There are two options here: 1) The PHY has no interrupt. phylib will poll the PHY once per second for link changes. 2) The PHY has in interrupt. Link changes will cause the interrupt to fire, and the phylib will then read the current state. For PHYs embedded within a switch driver by mv88e6xxx interrupts should always be used. I will do some testing on my espressobin. Andrew