Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp2911036rdb; Tue, 12 Sep 2023 16:44:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFZ7YCcC2ehQiPM3BV3xzvAFTR7l7rc3jL6FIesFFLogUuhVS9858OlRdkl/+P19S5tdLs2 X-Received: by 2002:a05:6808:21a6:b0:3a9:d957:efba with SMTP id be38-20020a05680821a600b003a9d957efbamr1318536oib.4.1694562275087; Tue, 12 Sep 2023 16:44:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694562275; cv=none; d=google.com; s=arc-20160816; b=gPdOI8roRRM5B+z5+hPueP2vp8CVvj5A1gZGqE2DF/Y0hThVbqe93RNSmd/fHAvHHW fLJsMi1+3h6Ksqyi5UtNA/PjRB3nf0ty4uRQjukCpZoSuUm6yxG4gz+xg8JFS/tG40we jj9Tunuqh4oVZQbgnwjJuw3CKUACxg/QR8NQd6wTp6w4Y0t7A7P6CmpdIB7R12jBnlDk aiEPCHNKDPIkLrVnW4r1tj2u07lI/gSK77eXDTKCDtOoKUgIWP9xgqL0eOW4KNeogdvX MbMw7/rwbR+zamuJF/DW7GUm7x2og6KizGdyTKJK5E2EKkOwjueUD3zkGEdRWKh07N3W jfpA== 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-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=6llGpFBr5L+Q2Nmimc2SvggKuqaRf8GostcQCX30dVo=; fh=OFHi7KINZfcqgKiTkoXfwgWtVHpcKl51zDyNAAr9hNg=; b=PaiC1w8adVKI+yxwERkdt+yEtQumb1ufN02Nq1TCJUu5OeX1Kb6IEtb11iaHw1oda8 bUjrXtiUm7BHn3SX+8wyRwme9gOQNuLCk5YdI1lwtK9a76NQ7kXPt1LGgEmnQudyxtTJ tDXHgH2YKcZS/F5IcVDOfCdcPyLPQfkUUYJLiEzqVA9dfkLriVuWQIxdtssqo2o/LBzT rIRk8ojC9udplRFdMf7rhI+NGiyM3E84gVQTD6rBJqBZnxj9Kor31wKydNGUZGeoYpCU ra67P7bLmTsn3PJ/TWm9yMqs1vULsnHCE5Z3G+5eGOL7rasrZPMiBkcSGrKKoLFJJ7uC 0qpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=qZkdGbw6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id a5-20020a655c85000000b005774c8a2ea7si5981212pgt.159.2023.09.12.16.44.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 16:44:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=qZkdGbw6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 4189582CEFDD; Tue, 12 Sep 2023 09:49:47 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237060AbjILQtt (ORCPT + 99 others); Tue, 12 Sep 2023 12:49:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236985AbjILQts (ORCPT ); Tue, 12 Sep 2023 12:49:48 -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 54C54110; Tue, 12 Sep 2023 09:49:40 -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-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=6llGpFBr5L+Q2Nmimc2SvggKuqaRf8GostcQCX30dVo=; b=qZkdGbw6IBcyMcqfQfYzu+oiKn 2Xi18pK7v5BZ5bUo7YA0bwRvYON1AsXiy3D2jWQMs1Le5x99fNBlUvACNWghw22S1yjcTYKGrXbyY q6GOPVw9B36X2+VnEHYlpyNZruWcF0JFZGFK7rdRH1kxPeY5ctEskPnrWjT3bCITGzgTyoJYt0R/D W9Ha5kIEXKz6l9Z3VbELaiu3DPNLeWwtL7ceBMl7MiO4VtoB7NHpXDWUsVzr5Hf+TkeD+84BeqyGR j7EcBT4GgAFLQ9IDVXKZ9Ut01TTli/VEfHp+K9soQAW5hXQ+G2lKoReulG6fdqUKvXowzZD0y59j3 9PjsUo4g==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:42686) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qg6a0-0001TE-1v; Tue, 12 Sep 2023 17:49:36 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1qg6a0-0002s6-B0; Tue, 12 Sep 2023 17:49:36 +0100 Date: Tue, 12 Sep 2023 17:49:36 +0100 From: "Russell King (Oracle)" To: Pawel Dembicki Cc: netdev@vger.kernel.org, Dan Carpenter , Simon Horman , Linus Walleij , Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v3 2/8] net: dsa: vsc73xx: convert to PHYLINK Message-ID: References: <20230912122201.3752918-1-paweldembicki@gmail.com> <20230912122201.3752918-3-paweldembicki@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230912122201.3752918-3-paweldembicki@gmail.com> Sender: Russell King (Oracle) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 12 Sep 2023 09:49:47 -0700 (PDT) On Tue, Sep 12, 2023 at 02:21:56PM +0200, Pawel Dembicki wrote: > +static void vsc73xx_phylink_mac_link_up(struct dsa_switch *ds, int port, > + unsigned int mode, > + phy_interface_t interface, > + struct phy_device *phydev, > + int speed, int duplex, > + bool tx_pause, bool rx_pause) > +{ > + struct vsc73xx *vsc = ds->priv; > + u32 val; > + > + if (speed == SPEED_1000) > + val = VSC73XX_MAC_CFG_GIGA_MODE | VSC73XX_MAC_CFG_TX_IPG_1000M; > + else > + val = VSC73XX_MAC_CFG_TX_IPG_100_10M; > + > + if (interface == PHY_INTERFACE_MODE_RGMII) > + val |= VSC73XX_MAC_CFG_CLK_SEL_1000M; > + else > + val |= VSC73XX_MAC_CFG_CLK_SEL_EXT; I know the original code tested against PHY_INTERFACE_MODE_RGMII, but is this correct, or should it be: if (phy_interface_is_rgmii(interface)) since the various RGMII* modes are used to determine the delay on the PHY side. Even so, I don't think that is a matter for this patch, but a future (or maybe a preceeding patch) to address. Other than that, I think it looks okay. Thanks. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!