Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2084383iof; Tue, 7 Jun 2022 19:11:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzmp29APM8TyJnFb8GeNliRftMNCdWgFySmbSfxIijg/B+Ukat0jSRynRqTXlOlKJMMiLwu X-Received: by 2002:a17:90b:17d0:b0:1e3:5324:c465 with SMTP id me16-20020a17090b17d000b001e35324c465mr35160429pjb.34.1654654310312; Tue, 07 Jun 2022 19:11:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654654310; cv=none; d=google.com; s=arc-20160816; b=SDh/tEyIDW3dFHlyqNLboJLcemzUVAgI/wfujGkDjnWQKxdnCZ/1QV/7ZKHAnxDowu F/F276O+w7t+kmnntgtpWWPn2tVEVupDQUNVhPRjkaVof7CsTWY33M+o9QdJu/uKBntJ RL91R/ccMKBL7riGV3MluI6rlJveqR9NjQm4m8ncRfJMzsK2Xp9EWvf94Oz8CY0bZGzj bGajmoccylr7TQ2ZS9E0/cO54ludwT6FPJQ2ajzLbTMlCLxj7INkFFER8UH/R67UGzPo Fxfotp4gxbMG8M/TA1nEFMruINnmvIwbPw7hln2MS6OQE2UVYNSvVYak6dyY3qvZv5PS LVDA== 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=7JLpmF2WWEjZt5s92gmeTOB0LAVvi3DsmkSlokLpb2s=; b=Ft6TQwxY4IKQ+UeqXHu0O0pRqd7ID6uzWTIgOX6Y2ggRJJ6JoLt7RVpt0OvL+8PwVt w5dozwqPkg1KXJrFCdPaqc8FDngLwBxP7MRW/5d+6SrSs7DnY1fwq0BnEYL0D6echCHT 6ygkMxSrMk5f7hvIN009cm1STrpYrBCrG2VQKS+E2Dexki1VA0Nozu5FHX1kRrAqzJzP twmGc7r3zVRmoF8iQFFAKvIz6hxA+pvKaxysj2TA2/vaLJPhFkgYShl3ruwyI1XvPd2l 1I6KqlImviphFPtYJ4rZ2ySsmA9zpXQqQ6rgS1DaQnAYYU1dRSnUeL290j0zkgDmjL/U cZOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=sgEjrBWy; 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 r11-20020a632b0b000000b003fcae93182bsi27552607pgr.370.2022.06.07.19.11.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 19:11:50 -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=sgEjrBWy; 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 out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2A90F32239D; Tue, 7 Jun 2022 18:45:45 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1381697AbiFGWSJ (ORCPT + 99 others); Tue, 7 Jun 2022 18:18:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379966AbiFGVLV (ORCPT ); Tue, 7 Jun 2022 17:11:21 -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 6DB3921682A; Tue, 7 Jun 2022 11:52:36 -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=7JLpmF2WWEjZt5s92gmeTOB0LAVvi3DsmkSlokLpb2s=; b=sgEjrBWyLnlD29+Ns5Q/ZOkcLs TUfzlICy3mxwL8/vxk4D0UGg8KV2IZkdkayNdiCB91n0/G/tCK1B1ojv9skTIkXd0b+09ti+aa/L1 ObMQMw01e/rumghyYynjZOOIM1nzYWkDSJ+i/JwwBp6DJiDC0V/hUUyrYHpLf67vy9MFpw97VyzY5 t/NZo/b0smUbP1XVZrfEMo62pwSWVhBuEkHIv6ZjDqd4gmcNAcDkXAkgtPv/nYtzFoMrFnIHa83KH 7C7VwSIsS9L1o/pUNbFPIyheMxx6lETSmK0VJihiNObpkcidZl4G4smoR08W/la1e0jm8XNfYMMO7 goLIgocQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:32776) 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 1nyeJY-0003q1-6t; Tue, 07 Jun 2022 19:52:28 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1nyeJV-00012v-B3; Tue, 07 Jun 2022 19:52:25 +0100 Date: Tue, 7 Jun 2022 19:52:25 +0100 From: "Russell King (Oracle)" To: Alvin =?utf-8?Q?=C5=A0ipraga?= Cc: luizluca@gmail.com, Linus Walleij , Alvin =?utf-8?Q?=C5=A0ipraga?= , 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 v2] net: dsa: realtek: rtl8365mb: fix GMII caps for ports with internal PHY Message-ID: References: <20220607184624.417641-1-alvin@pqrs.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220607184624.417641-1-alvin@pqrs.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 08:46:24PM +0200, Alvin Šipraga wrote: > From: Alvin Šipraga > > Since commit a18e6521a7d9 ("net: phylink: handle NA interface mode in > phylink_fwnode_phy_connect()"), phylib defaults to GMII when no phy-mode > or phy-connection-type property is specified in a DSA port node of the > device tree. The same commit caused a regression in rtl8365mb whereby > phylink would fail to connect, because the driver did not advertise > support for GMII for ports with internal PHY. > > It should be noted that the aforementioned regression is not because the > blamed commit was incorrect: on the contrary, the blamed commit is > correcting the previous behaviour whereby unspecified phy-mode would > cause the internal interface mode to be PHY_INTERFACE_MODE_NA. The > rtl8365mb driver only worked by accident before because it _did_ > advertise support for PHY_INTERFACE_MODE_NA, despite NA being reserved > for internal use by phylink. With one mistake fixed, the other was > exposed. > > Commit a5dba0f207e5 ("net: dsa: rtl8365mb: add GMII as user port mode") > then introduced implicit support for GMII mode on ports with internal > PHY to allow a PHY connection for device trees where the phy-mode is not > explicitly set to "internal". At this point everything was working OK > again. > > Subsequently, commit 6ff6064605e9 ("net: dsa: realtek: convert to > phylink_generic_validate()") broke this behaviour again by discarding > the usage of rtl8365mb_phy_mode_supported() - where this GMII support > was indicated - while switching to the new .phylink_get_caps API. > > With the new API, rtl8365mb_phy_mode_supported() is no longer needed. > Remove it altogether and add back the GMII capability - this time to > rtl8365mb_phylink_get_caps() - so that the above default behaviour works > for ports with internal PHY again. > > Fixes: 6ff6064605e9 ("net: dsa: realtek: convert to phylink_generic_validate()") > Signed-off-by: Alvin Šipraga Even though I raised concerns about the ext_int thing previously, this is still a step forward, so: Reviewed-by: Russell King (Oracle) Thanks! -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!