Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2390659rdh; Wed, 27 Sep 2023 00:40:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHt9RwZ2se9IHtw2Ore8OxDQrwl+5l5HUZHouEgRmyqcHc+ohbVC9fV4FT+UrtNkE9CcWTm X-Received: by 2002:a17:90a:df13:b0:274:914f:7fcc with SMTP id gp19-20020a17090adf1300b00274914f7fccmr1051486pjb.1.1695800416730; Wed, 27 Sep 2023 00:40:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695800416; cv=none; d=google.com; s=arc-20160816; b=Wet91VibJnmiL98rnjjjpbtFot+7HNGEc+J5ZQk9kL7+t9l2iz89iRWDx/RY2P32be VCVyzP9woyHfAbf7allM603TIdLpYXSUT0z8jEw6gDzI0QujggT1ddtUVwBje1g8sReU EUpaNV1kI++3+4y517mXuZ/YvM1mnK4ss3qht5GZtG93PoGz7dXPizPXgR1IBHr6AWkg k5KB8A/cxNJf4zgajWeezJEThmUHkLILDmWngTNPasur5HqKV40vaajlJVESk5mnikAI zQ9GZe2vLbPU02LnvLMguvkvwryXTleze8xs2VGs0Xfp/9QKe56udJpdnX5WRowm5XgZ HQzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=EwQWLVmf1ooAJ5jlKTNlvd+gS1fha7ZhTlSXaw/z40w=; fh=XzMDXTp3C+zlYsEY0E5yiz6+uPbowZbXQGBwVrl6BYk=; b=Jsxp2xEHpAiSyoWdII4IOP+qmFoWSVuGV+lsUKcMMhJ7FA/p10q+flSNSGlGraUkVr mb0RsMgeaH+UG4DW8QL5SIJ/MSRFvld9hBaccw9LzUxvyJ7k24vT0+pMyV6UycOwQlhZ ZwiAgPSTVjdfV9v5CINfEmnwbK73hVY6DLw6US27QLnZnecbLq9a5QKBlZNa+f2IqRt6 dQdhG6/q0ZLtkPgTza04gsvpl72h+MEoUwP3gZ1nNOnpsPdjYgQ3pgJF2FXum/keQoeC yaV462kq7dc3K87HW+5Q+fJ4vMYPF4UxWKuV0cBRDTJK1z/lX+//G0IuBTTNF9ySuG8V WwdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=CxGaMYfh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id lb11-20020a17090b4a4b00b00276e95d7657si16571527pjb.33.2023.09.27.00.40.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 00:40:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=CxGaMYfh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 0CEA380DCC81; Tue, 26 Sep 2023 22:32:48 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229804AbjI0Fcf (ORCPT + 99 others); Wed, 27 Sep 2023 01:32:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229809AbjI0Fbx (ORCPT ); Wed, 27 Sep 2023 01:31:53 -0400 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80EFD16627; Tue, 26 Sep 2023 16:03:50 -0700 (PDT) Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-530bc7c5bc3so11908501a12.1; Tue, 26 Sep 2023 16:03:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695769429; x=1696374229; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=EwQWLVmf1ooAJ5jlKTNlvd+gS1fha7ZhTlSXaw/z40w=; b=CxGaMYfhoebj3qNtBq/2tB/9g40QDxmcMb3Cg+LOVdTK7xGSqBvycfMOtYQF+MQ2b2 XDLT5ax5LBHBqLBjovk+ZOK7tdNokh2gru4AhcI2rUuBMuh2Y4yEuDlOljj2jpb7ke4c lfQLyRrYJNutCOub9wzkWk66fnN0I9PWDJoSazpWF75HrfKteRezQLccVK+NvHNBTDxe 0zEOH9ulP5DzaXIG+F7ODMmrA1Vi6E1d8DVpqUrBJgChkBZIiKx00k0JFZttYZRyrW7Q i7YR3vSAAFeSaSxGQs8fc9aAFKoDsRj3tGFk0S3P4Pl97KeH+Y/zh3bazsdScBHrI/8F fbrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695769429; x=1696374229; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=EwQWLVmf1ooAJ5jlKTNlvd+gS1fha7ZhTlSXaw/z40w=; b=BfvVND+4EVJTx6kZTk1ey1+O0EP5HA5qdDY/kfFnXuRGEGRTLYhiOJWGug/N+TNVJp VjGVlueCvrXjXoj4dj+ZTRXhCUqp1PP8GBTbNZMHgOjdTeOm4WPXfwDCiWMYF8GrH44U MeuH1vkcX06KGVLOpeqTe9oGq4kjuhqsill+uq3P+LlwlfKskwtlD5RxqnZbWcPoq4N1 RBJelsrQd8AwozP+owGwT6KZkVBF4f9ivUMwE9KLSfudG4ezlaS77tGcAe5IrbjBMatE EjP7RrhECOFrIo8O5WJ8OHBa4fzrDpJJnYHNBwYICGCSHKHVoGuSxHUFNmzwdQrMcrcy 0pfw== X-Gm-Message-State: AOJu0Yw5aLamuEJ5i2yGA8NKyECIxdVf/HstlaT9AtSrfrvSG6yFDUdz OLEjUsQKTQfxbf+Yjy27ORE= X-Received: by 2002:a17:906:ce:b0:9ad:ae3a:ed01 with SMTP id 14-20020a17090600ce00b009adae3aed01mr99651eji.2.1695769428900; Tue, 26 Sep 2023 16:03:48 -0700 (PDT) Received: from skbuf ([188.25.161.12]) by smtp.gmail.com with ESMTPSA id gu20-20020a170906f29400b009ad8796a6aesm8312608ejb.56.2023.09.26.16.03.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 16:03:48 -0700 (PDT) Date: Wed, 27 Sep 2023 02:03:46 +0300 From: Vladimir Oltean To: Pawel Dembicki , "Russell King (Oracle)" Cc: netdev@vger.kernel.org, Dan Carpenter , Simon Horman , Linus Walleij , Andrew Lunn , Florian Fainelli , "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: <20230926230346.xgdsifdnka2iawiz@skbuf> References: <20230912122201.3752918-1-paweldembicki@gmail.com> <20230912122201.3752918-3-paweldembicki@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email 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 (morse.vger.email [0.0.0.0]); Tue, 26 Sep 2023 22:32:49 -0700 (PDT) On Tue, Sep 12, 2023 at 05:49:36PM +0100, Russell King (Oracle) wrote: > 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! I also agree with adding one more patch to this which converts to phy_interface_is_rgmii(). Paweł: there was a recent discussion about the (ir)relevance of the specific rgmii phy-mode in fixed-link here. https://lore.kernel.org/netdev/ZNpEaMJjmDqhK1dW@shell.armlinux.org.uk/