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=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_PASS,UNPARSEABLE_RELAY,URIBL_BLOCKED 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 CD582C282C3 for ; Tue, 22 Jan 2019 19:23:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A9EA42084A for ; Tue, 22 Jan 2019 19:23:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726647AbfAVTXv (ORCPT ); Tue, 22 Jan 2019 14:23:51 -0500 Received: from belmont80srvr.owm.bell.net ([184.150.200.80]:37503 "EHLO mtlfep02.bell.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725925AbfAVTXv (ORCPT ); Tue, 22 Jan 2019 14:23:51 -0500 X-Greylist: delayed 461 seconds by postgrey-1.27 at vger.kernel.org; Tue, 22 Jan 2019 14:23:50 EST Received: from bell.net mtlfep02 184.150.200.30 by mtlfep02.bell.net with ESMTP id <20190122191608.NIYR27401.mtlfep02.bell.net@mtlspm01.bell.net> for ; Tue, 22 Jan 2019 14:16:08 -0500 Received: from [192.168.0.138] (really [64.231.92.241]) by mtlspm01.bell.net with ESMTP id <20190122191608.YEIG17436.mtlspm01.bell.net@[192.168.0.138]>; Tue, 22 Jan 2019 14:16:08 -0500 To: Russell King From: John David Anglin Openpgp: preference=signencrypt Cc: Andrew Lunn , Vivien Didelot , Florian Fainelli , netdev@vger.kernel.org Subject: net: phylink: dsa: mv88e6xxx: flaky link detection on switch ports with internal PHYs Message-ID: <49eec816-9238-c893-0860-602aa8965515@bell.net> Date: Tue, 22 Jan 2019 14:16:09 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------12D472E0F853293074B96F3A" Content-Language: en-US X-Cloudmark-Analysis: v=2.2 cv=O6bWhF1W c=1 sm=0 tr=0 a=jJmVOGxBrKxWvcjqaG+oVg==:17 a=3JhidrIBZZsA:10 a=r77TgQKjGQsHNAKrUKIA:9 a=FBHGMhGWAAAA:8 a=QTR841BtkRpgYtYWoY8A:9 a=QEXdDO2ut3YA:10 a=iJddFlBKhyIzmVO2r1sA:9 a=l6ZAJouCkPoA:10 a=9gvnlMMaQFpL9xblJ6ne:22 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This is a multi-part message in MIME format. --------------12D472E0F853293074B96F3A Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable I've been hacking on a espressobin board to try to improve ptp support, etc.=C2=A0 However, I have a big problem with link detection on the wan, lan0 and lan1 ports. I have a standard bridge configuration using systemd-networkd.=C2=A0 Currently, I'm working with linux v4.20.2. =46rom power on, none of the wan, lan0, lan1 or br0 achieve link (LOWER_UP).=C2=A0 networkctl shows no carrier for these ports.=C2=A0 Disconnecting and reconnecting cables i= s not detected and makes no difference to link state.=C2=A0 I=C2=A0 added a debug printout in mv88e6352_port_link_state, but the routine is not called.=C2=A0 As far as I can tell, link state changes are not detected using PHY interrupts.=C2=A0 And yet, if the card is rebooted, link detection seems to magically work. I know that the 88E6341 port registers detect port link (also RJ45 LED) correctly. The attached patch fixes link detection at power on.=C2=A0 However, link state still doesn't update if a cable is disconnected or moved. I'm puzzled as to how this is supposed to work.=C2=A0 Thoughts? Regards, Dave Anglin --=20 John David Anglin dave.anglin@bell.net --------------12D472E0F853293074B96F3A Content-Type: text/plain; charset=UTF-8; name="phylink.c.d" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="phylink.c.d" ZGlmZiAtLWdpdCBhL2RyaXZlcnMvbmV0L3BoeS9waHlsaW5rLmMgYi9kcml2ZXJzL25ldC9w aHkvcGh5bGluay5jDQppbmRleCA5YjhkZDBkMGVlNDIuLmMxZWMxM2IzMjBlZSAxMDA2NDQN Ci0tLSBhL2RyaXZlcnMvbmV0L3BoeS9waHlsaW5rLmMNCisrKyBiL2RyaXZlcnMvbmV0L3Bo eS9waHlsaW5rLmMNCkBAIC00MDUsNiArNDA1LDcgQEAgc3RhdGljIHZvaWQgcGh5bGlua19y ZXNvbHZlKHN0cnVjdCB3b3JrX3N0cnVjdCAqdykNCiAJCWNhc2UgTUxPX0FOX1BIWToNCiAJ CQlsaW5rX3N0YXRlID0gcGwtPnBoeV9zdGF0ZTsNCiAJCQlwaHlsaW5rX3Jlc29sdmVfZmxv dyhwbCwgJmxpbmtfc3RhdGUpOw0KKwkJCXBoeWxpbmtfZ2V0X21hY19zdGF0ZShwbCwgJmxp bmtfc3RhdGUpOw0KIAkJCXBoeWxpbmtfbWFjX2NvbmZpZyhwbCwgJmxpbmtfc3RhdGUpOw0K IAkJCWJyZWFrOw0KIA0K --------------12D472E0F853293074B96F3A--