Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp283759pxb; Thu, 14 Apr 2022 22:41:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwis7awDW6md4KSAH83TTjok3Iqoi+jajF1fMWnSo3JLv+7MxLIjAow6CNye/kDgW24uNNa X-Received: by 2002:a05:6a00:a12:b0:504:e93f:2dd9 with SMTP id p18-20020a056a000a1200b00504e93f2dd9mr7310083pfh.49.1650001303607; Thu, 14 Apr 2022 22:41:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650001303; cv=none; d=google.com; s=arc-20160816; b=e5usoPbGnZVEYW/609qyE3vSctGpGsLlea7QFhw2BDnQ8TGg0bn7gRw35/h1NeT4cm Scs1l+i7JQ+xqFHmkd/v3nzRYgi2QemJoQR6N5E5gg3z0OFN6q1G4/mhE7sO4ezp9YtW CW5j3pcfrZGoN4DJa1i1uSmi18owBhL1vhRh9dLLTjn7BAkTl4WYkdsX6EFYJzvvo7FV qJ5PI3ezPO5GN7y7wmTCRTURRsMhIgJ0BCtd0NiDLKYlnlah19FIKJFvUEts0hBC04Ie 7XM0okIfUFnE7OSc8yDkHgGWIhruYZbuG2MXgZzyhEK2AbUMS3I33KIohKslV1eE7TAE QLDw== 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=se7TDjKdD4lTbs4/EAs3EJoTc89hcEiop1DKf6IJ6Ts=; b=tU+IzSv2y3khbd7+/8mQEfOgD9TnQOwFn+huf0PFkH+AUjyz2nRHRDrvQ2rlK9dY1V 6Q3BwbDP6BV49Y/KEWfF/Ou9VgZ7q37IpigUB6RKEhyMK/xeTybS/fQYiBe2tjYaMi3F uHNVDesiEyiS+d/de5Eyl9zgKApGlWlGZd62UdGVInQUvJDbvX8BDGhmHdO65YHQbLZd +X3BAXRKyd8EOCgy50ALqOWEA/EG3/vrAc8GsB0j/RKZlqJucvY8WPHvc4Fn1rFF5EXs E9e2gZJ0CHTCcOpmAq8DzwWIaX+20W4ebOZZaUihrYrGv1tXTjTAtyyGoOjbQJiNIur5 gY6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=O24dwOND; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 139-20020a630091000000b003a224fc174fsi559233pga.757.2022.04.14.22.41.30; Thu, 14 Apr 2022 22:41:43 -0700 (PDT) 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=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=O24dwOND; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243175AbiDNNEw (ORCPT + 99 others); Thu, 14 Apr 2022 09:04:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232078AbiDNNEu (ORCPT ); Thu, 14 Apr 2022 09:04:50 -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 2075F8EB67; Thu, 14 Apr 2022 06:02:26 -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=se7TDjKdD4lTbs4/EAs3EJoTc89hcEiop1DKf6IJ6Ts=; b=O24dwONDjdolTVYJL/Mivk0Css Nam3xqr0eUKo8jnldPTeolq4WDbIxlwcwk2ZvbLTynj3gOn8SRkPyuY2xpVFiHkisvZqLR6e96TpZ iROwj/LKQwBHC+aUkXGrfIYm2lRQ1wWUaWwIv6ZKyGAxPzDmVgqgNjupkad6z4uXeYQ+RsbNqcIIm h1guXKEYNI1lRPmhu/Z0AWZDKKi6Ky88Hddzh0K6yR2quLxW5i3GKNrTf3tCc/TuH9ngsHT9zhOZS vCdRX3d6WVkPGIi1Zd3sAHCMe6ZCla7x6BJrtBvNBOijo3EeHFWRnOOun6b/wu+WU2f1XxP8ZASRL FDEipquA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:58262) 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 1nez70-0004Zy-SF; Thu, 14 Apr 2022 14:02:14 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1nez6w-0004KB-Vf; Thu, 14 Apr 2022 14:02:10 +0100 Date: Thu, 14 Apr 2022 14:02:10 +0100 From: "Russell King (Oracle)" To: =?iso-8859-1?Q?Cl=E9ment_L=E9ger?= Cc: Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S . Miller" , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Geert Uytterhoeven , Magnus Damm , Heiner Kallweit , Thomas Petazzoni , Herve Codina , =?iso-8859-1?Q?Miqu=E8l?= Raynal , Milan Stevanovic , Jimmy Lalande , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, netdev@vger.kernel.org, Laurent Gonzales , Jean-Pierre Geslin , Phil Edworthy Subject: Re: [PATCH net-next 06/12] net: dsa: rzn1-a5psw: add Renesas RZ/N1 advanced 5 port switch driver Message-ID: References: <20220414122250.158113-1-clement.leger@bootlin.com> <20220414122250.158113-7-clement.leger@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220414122250.158113-7-clement.leger@bootlin.com> Sender: Russell King (Oracle) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE, 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 Thu, Apr 14, 2022 at 02:22:44PM +0200, Cl?ment L?ger wrote: > Add Renesas RZ/N1 advanced 5 port switch driver. This switch handles 5 > ports including 1 CPU management port. A MDIO bus is also exposed by > this switch and allows to communicate with PHYs connected to the ports. > Each switch port (except for the CPU management ports) are connected to > the MII converter. > > This driver include basic bridging support, more support will be added > later (vlan, etc). This patch looks to me like it needs to be updated... > +static void a5psw_phylink_validate(struct dsa_switch *ds, int port, > + unsigned long *supported, > + struct phylink_link_state *state) > +{ > + __ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0 }; > + > + phylink_set_port_modes(mask); > + > + phylink_set(mask, Autoneg); > + phylink_set(mask, Pause); > + phylink_set(mask, Asym_Pause); > + > + phylink_set(mask, 1000baseT_Full); > + if (!dsa_is_cpu_port(ds, port)) { > + phylink_set(mask, 10baseT_Half); > + phylink_set(mask, 10baseT_Full); > + phylink_set(mask, 100baseT_Half); > + phylink_set(mask, 100baseT_Full); > + } If the port supports e.g. RGMII (as it does via the media converter) then it also supports 1000baseX modes as well - because a PHY attached to the RGMII port can convert to 1000baseX. > + > + linkmode_and(supported, supported, mask); > + linkmode_and(state->advertising, state->advertising, mask); > +} This basically means "I support every phy_interface_t mode that has ever been implemented" which surely is not what you want. I doubt from the above that you support 10GBASE-KR for example. Please instead implement the .phylink_get_caps DSA switch interface, and fill in the config->supported_interfaces for all interface modes that the port supports (that including the media converter as well) and the config->mac_capabilities members. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!