Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp3117997pxb; Thu, 10 Feb 2022 12:43:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJxp6hsx8pKewqpsZU4A1XxWn5U2v0NihpBufZOf7+wBmIYJuWFDymtcRNEWQ98QH9UmlmNQ X-Received: by 2002:a17:906:9b88:: with SMTP id dd8mr3546343ejc.561.1644525790033; Thu, 10 Feb 2022 12:43:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644525790; cv=none; d=google.com; s=arc-20160816; b=BC3GatU1waZbl7CQMcW83ItNf6O17t7kY5YHyvu6V2AUYVL/GpYrm440fOGNGWLAW2 ddmneMBm4aErLE7bhsiU3vltMXmszYZHJ+hKggUKQGtCTHUin2NwTM0udZgRou7Nd8qr rifSct+sZQmH6/84mfLqX41HoFWtTXfq/mYOyu+hRlRDJLzdE04FE+br48LsdJtSj5bm 4fEkm5iWumjb7gNXuQ4Mdb5AG4Y7MSSpWp3ZbFRGV+dkR5zgRcJuL1f2tkMKUgqbAIAQ 7GsDT1nv3W2A7TJrMmzM0S7Mxi/fGY1as4KD/0Xa87TIgowlL+iekt7bl3z7JMFBhjUS Yqpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=0aRk2HscakizWLCqrQ5CB9tK40FZrYvTnEVJfReiNFY=; b=pA8WEKidjrXmQBKyfGBepov3TcuvzKvWlWzCV1pzu5GJe/OE9ojMxLdTJ3+euW25Bh 36BboEhBEWDDnmZwGCXTCRYiyvjvk0wv7P18lfBG99ISceeOlBxW0Gi54LPazoiS76xb IBNnfnqYRYTNUZABtjLcc1L7MQFUR9UPw9i4zXDsLvLwVSGOH9pAsa4FYMfc4Bfv03Jk zQY+JQ8r8xVn04oEFOo33D2kXxCqldARCvAR6jUt0fGpq3eYlUHGryUZLbiRJuXS2vHE HkWazlNb4ityuSpNBpiXqU82phmxnY/P1gjlCrSaOOMIWNh2l5WtQ1EjLiSBGcTE+925 wClg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gateworks-com.20210112.gappssmtp.com header.s=20210112 header.b=cpP2LFQ2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s10si15998477edd.190.2022.02.10.12.42.43; Thu, 10 Feb 2022 12:43:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gateworks-com.20210112.gappssmtp.com header.s=20210112 header.b=cpP2LFQ2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243807AbiBJPxD (ORCPT + 99 others); Thu, 10 Feb 2022 10:53:03 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:43730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236180AbiBJPxB (ORCPT ); Thu, 10 Feb 2022 10:53:01 -0500 Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C080FC24 for ; Thu, 10 Feb 2022 07:53:00 -0800 (PST) Received: by mail-pl1-x62d.google.com with SMTP id x3so2177249pll.3 for ; Thu, 10 Feb 2022 07:53:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gateworks-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0aRk2HscakizWLCqrQ5CB9tK40FZrYvTnEVJfReiNFY=; b=cpP2LFQ2eDQJe1EcaNgZ1viwdC1hsSCsiX89PLoiweg3TfX7WlC3XJrAXXye7iSxfK DZUODoJBTptRW8uP3q03n32z5WbCGSPy2vcAXI2pj6jgniJH+7RL2EEfNNkorwwdJoov p1absB5z4ZacBDKRjCGZEwtE90JG0qMJBt1YnOg5KMgjG8wnh4BrDhAZp/3ZhLWex9xB OVQQRLubLo79JrW1ihdgN/sYDdQ66R08TGoE8jU/IT7NHuDTBelht/k9p8laqHVBGahW HU57kCTbXYB41R+bE+SK7Slk/74xGa8RtIiGKY2fNOeJO+/V40FfKo/k8vxPwi8ChtyN EHaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0aRk2HscakizWLCqrQ5CB9tK40FZrYvTnEVJfReiNFY=; b=CtknlDgkz5L+AC8flXG8YEs7le4J4zxLIyy/G8RuaLK7mpiS2+sy88VbZ00lATZlP6 Bc5oBsJZoXq22ZPKlA5kB376t44wrxuGUroVsz4IiebcLCufweWCoqA+i3PqBNI4xCGW FHKiAbl/TPwS7BI/JeznO8OhrBOhaWQXivYl5ilfwtoU7ZKPKOXpTOMe818hmLhDPSIQ 5KKzQ66fwSoQbTah76g60zxPWgxWzXS6WHmAYrApuweZTg0aZ2LsncVWq5m2GEZKxD30 o8d9vAQgECV/+OeBw7b1EPmpAfBhMGBgd98i4RGHlIX4bN9FU+p4ydXLtwOCMjRDdJqs ip+g== X-Gm-Message-State: AOAM533DbPrdKHu8Mt0/LJibKXqgXeohqfPVx1epsl4leHxlm2rH2VFa eVTYU93+H2h05b2U5MX/N0o66ohFJykqTL9vSpH61Q== X-Received: by 2002:a17:903:32cb:: with SMTP id i11mr7831244plr.118.1644508380054; Thu, 10 Feb 2022 07:53:00 -0800 (PST) MIME-Version: 1.0 References: <20210421055047.22858-1-ms@dev.tdt.de> In-Reply-To: From: Tim Harvey Date: Thu, 10 Feb 2022 07:52:49 -0800 Message-ID: Subject: Re: [PATCH net v3] net: phy: intel-xway: enable integrated led functions To: Andrew Lunn Cc: Martin Schiller , Hauke Mehrtens , martin.blumenstingl@googlemail.com, Florian Fainelli , hkallweit1@gmail.com, Russell King - ARM Linux , David Miller , kuba@kernel.org, netdev , open list Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 9, 2022 at 4:04 PM Andrew Lunn wrote: > > > The errata can be summarized as: > > - 1 out of 100 boots or cable plug events RGMII GbE link will end up > > going down and up 3 to 4 times then resort to a 100m link; workaround > > has been found to require a pin level reset > > So that sounds like it is downshifting because it thinks there is a > broken pair. Can you disable downshift? Problem is, that might just > result in link down. Its a bad situation. The actual errata is that the device latches into a bad state where there is some noise on an ADC or something like that that cause a high packet error rate. The firmware baked into the PHY has a detection mechanism looking at these errors (SSD errors) and if there are enough of them it takes the link down and up again and if that doesn't resolve in 3 times it shifts down to 100mbs. They call this 'ADS' or 'auto-down-speed' and you can disable it but it would just result in leaving your bad gbe link up. It's unclear yet if it's better to just detect the ADS event and reset or to disable ADS and look for the SSD errors myself (which I can do). > > > - 1 out of 100 boots or cable plug events (varies per board) SGMII > > will fail link between the MAC and PHY; workaround has been found to > > require a pin level reset > > I don't suppose there is a register to restart SGMII sync? Sometimes > there is. Not that I see but I haven't really investigated too much into mitigating that issue yet. The errata for that issue says you need to assert reset but then it also says it can occur on a cable plug event which makes me think an MDI ANEG restart may be sufficient. > > Anyway, shared reset makes this messy, as you said. Unfortunate > design. But i don't see how you can work around this in the > bootloader, especially the cable plug events. > Ya, in hindsight the shared reset was a really bad idea, of course the last PHY we used on this particular board for years before the supply chain crashed didn't have any issues like this. I agree that I can't do anything in boot firmware. I was planning on having some static code that registered a PHY fixup to get a call when these PHYs were detected and I could then kick off a polling thread to watch for errors and trigger a reset. The reset could have knowledge of the PHY devices that called the fixup handler so that I can at least setup each PHY again. Regardless of how I go about this the end result may be unreliable networking for up to a couple of minutes after board power-up or cable plug event. Best Regards, Tim