Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2073802iof; Tue, 7 Jun 2022 18:53:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwNSYYTchMZ9e5B32jij3XkL1LW7CSvfcOak0qSoe8i3VKsTkOtXG9dPUEE1ggjV4laGrDi X-Received: by 2002:a17:902:dacb:b0:167:621b:f2ec with SMTP id q11-20020a170902dacb00b00167621bf2ecmr19620551plx.19.1654653223232; Tue, 07 Jun 2022 18:53:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654653223; cv=none; d=google.com; s=arc-20160816; b=qg2cLSm/nP1pgpm4wzyJMbeDp6EWwG9L7w/LXJCbjbCNXBL9Dt3cN0O4+MrT5JNJHc 60uIph+ewGboDK7rHoqGmif5TSGh8pUqL0LnAyhoSxh8T+TJ9WVChdHo3gN7OtrL6se/ 7lB9srSSKitCAAfPMk6OlNcFLI83M0LFmmHgO3fg6yqqsY7yU59rJFqYGcBeAm6GM8iD YfE1SaPoTtNITirK7n9FB8CuvvJeGRt6nHTEDuDoBLRvfiI9uzngucoZnEGLJG4jS/ff Vb5JfyGVAjfaGOXba+E6sOejto2IgSqrMn//wWfO4JgJmcZNPMVZogtmtQ888dK1g1gU BfOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=7rNMDeDx4T7YoKNaSO1w0qFDUszwAfmML4PKjeMx32o=; b=mdIVTjLwy785oCUYWd0E4sWe4T5UXANcwt/F+HiEW3HPXJoSzlk6jRdG+JqYXRb3x/ VgzQw5yjuEDebgj0pfIvDnVn0WgDJlv33xCs+2Suk4Pb0/nVigKEL3Hr2we/CJJnmaU/ cPJlnDxXgLyRpVrHHnxjTJer+hwn3SUQw4Do1fHKKTGr1w8UVUb9mEpRIXLoq9/wW9Re jhb+6+tGsJVfzbDCvNVjl9q/aUnDjZtB+U4qcYuAWu8yrxCV6EXzImYst6LoYEAKjJ4v xf28ALNhgCWeFIxzVX97RMrj682n34/7J5fIHPLWBRlcPkrOcFSYhuiYvfKFKbSdG8kQ PRyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=duVZ8Cv8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id b17-20020a63a111000000b003fc1bb74001si12868601pgf.54.2022.06.07.18.53.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 18:53:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=duVZ8Cv8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 36F602E34A7; Tue, 7 Jun 2022 18:38:37 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343490AbiFGOpp (ORCPT + 99 others); Tue, 7 Jun 2022 10:45:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244641AbiFGOpo (ORCPT ); Tue, 7 Jun 2022 10:45:44 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54BE34474E; Tue, 7 Jun 2022 07:45:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=7rNMDeDx4T7YoKNaSO1w0qFDUszwAfmML4PKjeMx32o=; b=duVZ8Cv8kSYWaiAPwvDGRyUCLc TkqjYDEDgtPGgBTzekHCiNFIP7nQmYo1b9iDwZGrEFfquSQ/SnNneDMKCyyCildK0IskT6FsHU4El WOpwDgXKCfNLRnfSCJE6Sd4r+IauRpCpbwMv+c5Y3U62tzpYkqEwFWEaf3vvI1LCJ0Sj9Mp70Za1D vJF7eg7dJCOsS9xRuLgfa2A43pboAie4uYeYcF3idUbsPHwOfhhALEODKKcMeDTJh3Zi69J5e0Lz2 MfSI/95cffnnZ89ZIX+EUcaPJvOWnfjV+dFEbU8morurvQ9WJN4rdidsS+iMo93NIrOt132rjjYJq ODWZDJvQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:32770) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nyaSc-0003cV-Dc; Tue, 07 Jun 2022 15:45:34 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1nyaSa-0000so-6n; Tue, 07 Jun 2022 15:45:32 +0100 Date: Tue, 7 Jun 2022 15:45:32 +0100 From: "Russell King (Oracle)" To: Alvin =?utf-8?Q?=C5=A0ipraga?= Cc: Luiz Angelo Daros de Luca , Alvin =?utf-8?Q?=C5=A0ipraga?= , Linus Walleij , Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH net] net: dsa: realtek: rtl8365mb: fix GMII caps for ports with internal PHY Message-ID: References: <20220606130130.2894410-1-alvin@pqrs.dk> <20220606134708.x2s6hbrvyz4tp5ii@bang-olufsen.dk> <20220607141744.l2yhwnix6aoiwl54@bang-olufsen.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220607141744.l2yhwnix6aoiwl54@bang-olufsen.dk> Sender: Russell King (Oracle) X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Tue, Jun 07, 2022 at 02:17:44PM +0000, Alvin Šipraga wrote: > On Tue, Jun 07, 2022 at 03:05:40PM +0100, Russell King (Oracle) wrote: > > On Tue, Jun 07, 2022 at 10:52:48AM -0300, Luiz Angelo Daros de Luca wrote: > > > > > > Luiz, Russel: > > > > > > > > > > > > Commit a5dba0f207e5 ought to have had a Fixes: tag I think, because it > > > > > > claims to have been fixing a regression in the net-next tree - is that > > > > > > right? I seem to have missed both referenced commits when they were > > > > > > posted and never hit this issue personally. I only found things now > > > > > > during some other refactoring and the test for GMII looked weird to me > > > > > > so I went and investigated. > > > > > > > > > > > > Could you please help me identify that Fixes: tag? Just for my own > > > > > > understanding of what caused this added requirement for GMII on ports > > > > > > with internal PHY. > > > > > > > > > > I have absolutely no idea. I don't think any "requirement" has ever been > > > > > added - phylib has always defaulted to GMII, so as the driver stood when > > > > > it was first submitted on Oct 18 2021, I don't see how it could have > > > > > worked, unless the DT it was being tested with specified a phy-mode of > > > > > "internal". As you were the one who submitted it, you would have a > > > > > better idea. > > > > > > > > > > The only suggestion I have is to bisect to find out exactly what caused > > > > > the GMII vs INTERNAL issue to crop up. > > > > > > > > Alright, thanks for the quick response. Maybe Luiz has a better idea, otherwise > > > > I will try bisecting if I find the time. > > > > > > I don't know. I just got hit by the issue after a rebase (sorry, I > > > don't know exactly from which commit I was rebasing). > > > But I did test the net (!-next) and left a working commit note. You > > > can diff 3dd7d40b43..a5dba0f20. > > > If I'm to guess, I would blame: > > > > > > 21bd64bd717de: net: dsa: consolidate phylink creation > > > > Why do you suspect that commit? I fail to see any functional change in > > that commit that would cause the problem. > > Agree, seems like the referenced commit makes no functional change. > > But thanks for the range of commits Luiz, I found one that looks like the > culprit. It's small so I will reproduce the whole thing below. Will test later. This one I agree could well be the culpret, but it means that the original premise that PHY_INTERFACE_MODE_INTERNAL was being used is incorrect - it's actually been relying on using PHY_INTERFACE_MODE_NA. It instead means that PHY_INTERFACE_MODE_NA was being used, which really isn't good, because PHY_INTERFACE_MODE_NA internally inside phylink has always had a special meaning - that being with the validate step which has been used to get _all_ possible modes from the MAC. This was never intended to be used for anything except phylink's internal use to retrieve that information from the MAC driver to make decisions about what mode(s) a SFP should use. So yes, this is most likely the culpret, and if proven, please use it for the Fixes: tag for any fixes to drivers that incorrectly relied upon that behaviour. Thanks. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!