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=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,UNPARSEABLE_RELAY 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 965DCC282D7 for ; Wed, 30 Jan 2019 17:08:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6673921473 for ; Wed, 30 Jan 2019 17:08:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732347AbfA3RIl convert rfc822-to-8bit (ORCPT ); Wed, 30 Jan 2019 12:08:41 -0500 Received: from belmont80srvr.owm.bell.net ([184.150.200.80]:45189 "EHLO mtlfep02.bell.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731717AbfA3RIk (ORCPT ); Wed, 30 Jan 2019 12:08:40 -0500 Received: from bell.net mtlfep02 184.150.200.30 by mtlfep02.bell.net with ESMTP id <20190130170839.NGZC27401.mtlfep02.bell.net@mtlspm01.bell.net> for ; Wed, 30 Jan 2019 12:08:39 -0500 Received: from [192.168.0.138] (really [64.231.92.241]) by mtlspm01.bell.net with ESMTP id <20190130170839.ZYZB17436.mtlspm01.bell.net@[192.168.0.138]>; Wed, 30 Jan 2019 12:08:39 -0500 To: Andrew Lunn Cc: Russell King , Vivien Didelot , Florian Fainelli , netdev@vger.kernel.org References: <49eec816-9238-c893-0860-602aa8965515@bell.net> <20190122202834.GB12052@lunn.ch> <09fce2e0-9dd2-ea30-7e7d-72f04eede68b@bell.net> <20190122223649.GD3634@lunn.ch> <20190123002240.GF3634@lunn.ch> From: John David Anglin Openpgp: preference=signencrypt Subject: Re: net: phylink: dsa: mv88e6xxx: flaky link detection on switch ports with internal PHYs Message-ID: Date: Wed, 30 Jan 2019 12:08:39 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20190123002240.GF3634@lunn.ch> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Content-Language: en-US X-Cloudmark-Analysis: v=2.2 cv=O6bWhF1W c=1 sm=0 tr=0 a=jJmVOGxBrKxWvcjqaG+oVg==:17 a=IkcTkHD0fZMA:10 a=3JhidrIBZZsA:10 a=FBHGMhGWAAAA:8 a=E46PYbtkHmayQp2FQqkA:9 a=QEXdDO2ut3YA:10 a=9gvnlMMaQFpL9xblJ6ne:22 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 2019-01-22 7:22 p.m., Andrew Lunn wrote: > >From my Espressobin > > cat /proc/interrupts > ... > 44: 0 0 mv88e6xxx-g1 3 Edge mv88e6xxx-g1-atu-prob > 46: 0 0 mv88e6xxx-g1 5 Edge mv88e6xxx-g1-vtu-prob > 48: 38 24 mv88e6xxx-g1 7 Edge mv88e6xxx-g2 > 51: 0 1 mv88e6xxx-g2 1 Edge !soc!internal-regs@d0000000!mdio@32004!switch0@1!mdio:11 > 52: 0 0 mv88e6xxx-g2 2 Edge !soc!internal-regs@d0000000!mdio@32004!switch0@1!mdio:12 > 53: 38 23 mv88e6xxx-g2 3 Edge !soc!internal-regs@d0000000!mdio@32004!switch0@1!mdio:13 > > These are PHY interrupts. If we come back to my trying to use the INTn pin on the esspressobin, I have found that clearing and resetting the interrupt enable bits in the global control register (offset 0x4) restarts link detection when the device is stuck.  This suggests that the INTn connection to MPP2_23 is low when the the GIC interrupt is enabled on this pin.  Possibly, this is caused by the fact that EEIntEn is set to 1 on reset.  INTn then goes low when EEPROM loading is done.  Another possibility might be race conditions in processing interrupts. Thoughts? Dave -- John David Anglin dave.anglin@bell.net