Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 042D0C05027 for ; Fri, 10 Feb 2023 10:57:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232242AbjBJK5G (ORCPT ); Fri, 10 Feb 2023 05:57:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231400AbjBJK5E (ORCPT ); Fri, 10 Feb 2023 05:57:04 -0500 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 C3E944608E; Fri, 10 Feb 2023 02:57:02 -0800 (PST) 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-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding: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=mOxzUNdxDyu4EvIpxaCXo+zY4fgrjFKuSLiD4nmJaak=; b=O6QeR6Hkb3aVPLJ+4SGJ/kpzu/ Z2llFq3PjIg/6n7I3i/wi3ItbsXTzbeWTIxMtTDqB+wdugrF4MWgusqw6Gxeb9Ggu/bitzcTrZQae s+yHhS4kviyVQf6NahJO1s2EPWsK+CK1i7FrY7Nv5yJt75+E0Y9QL+yp+aITrR15o3JKE5hsE/+Rx o3L3/V6w0olRgW99SzFwHHycn3jf05SMNnnKcUc9H9rbR8QeYHI16ZY8hHL9X3xAKDL4SUaZUwBC1 GIEGzoQcExvml7rmeZS47lHWItqvop+PrDffitw3n4NUen5qKEfSyu70cTe11jPS2N/9S4tThrODz ik/YdM+A==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:36510) 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 1pQR5P-0001LQ-Pc; Fri, 10 Feb 2023 10:56:59 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1pQR5N-0005W1-2a; Fri, 10 Feb 2023 10:56:57 +0000 Date: Fri, 10 Feb 2023 10:56:57 +0000 From: "Russell King (Oracle)" To: Daniel Golle Cc: netdev@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Heiner Kallweit , Lorenzo Bianconi , Mark Lee , John Crispin , Felix Fietkau , AngeloGioacchino Del Regno , Matthias Brugger , DENG Qingfang , Landen Chao , Sean Wang , Paolo Abeni , Jakub Kicinski , Eric Dumazet , "David S. Miller" , Vladimir Oltean , Florian Fainelli , Andrew Lunn , Jianhui Zhao , =?iso-8859-1?Q?Bj=F8rn?= Mork Subject: Re: [PATCH v2 11/11] net: dsa: mt7530: use external PCS driver Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Russell King (Oracle) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 07, 2023 at 02:24:17PM +0000, Daniel Golle wrote: > @@ -2728,11 +2612,11 @@ mt753x_phylink_mac_select_pcs(struct dsa_switch *ds, int port, > > switch (interface) { > case PHY_INTERFACE_MODE_TRGMII: > + return &priv->pcs[port].pcs; > case PHY_INTERFACE_MODE_SGMII: > case PHY_INTERFACE_MODE_1000BASEX: > case PHY_INTERFACE_MODE_2500BASEX: > - return &priv->pcs[port].pcs; > - > + return priv->ports[port].sgmii_pcs; My only concern here is that we also use the PCS when in TRGMII mode in this driver, but the mtk pcs code from mtk_eth_soc doesn't handle TRGMII (and getting the link timer will fail for this mode, causing the pcs_config() method to fail.) Thus, this driver will stop working in TRGMII mode. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!