Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp579145lqg; Fri, 1 Mar 2024 14:18:33 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUmxgARc/d2HSWtfznqi+P8n14NDnjdH8xnbd6wz1Oxc4JQIcSIi9xs0m3AqMxd2VS7rTITQrL450F140T3lFi1iK5EhN5ulp7OkQ7y3g== X-Google-Smtp-Source: AGHT+IGTBxOV+tASjS33p09RY/FqYu4KCzGvXNvIpZxjKUYPaYri2o/vINtBEpIJsP6yuTCWawD/ X-Received: by 2002:a50:85c6:0:b0:565:9fff:6046 with SMTP id q6-20020a5085c6000000b005659fff6046mr2399442edh.3.1709331513371; Fri, 01 Mar 2024 14:18:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709331513; cv=pass; d=google.com; s=arc-20160816; b=TDqbdYvIQRypJEmXp9qJtjc2BPs3QuEa3TVVGdwtcr6/RGP7zKprqj0k5E9YsP4D5R qO3K2Fa035LHowc6/cS3N+dCZtehwPBwCb/t+4j1xgDaT+2S1XRNyVnm2FfcQHaMEx3r VBqW3daluU/R2Q4tAeota5jOw7rAugGFSLeSJmZz/EeR8iQhe3eFthIA62789M6/RC6x bWUUbyIgk41cEhR49KMQvhj6acw6dDJtNV46AEAFeVt54ajNYR6id9FQewXxV4rVz6yB nNy8zizvH4PTGAQebA781qg0Q2RhoCvegyBoiosccFJUqRrTISIsCwUrWrColfrNPq3c w8oA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=Vz1OG2yxyOrvNMyrVQ5ZIeKhi3z1LeqYLOa11e4nui4=; fh=fuOgjgsJLXydoontb549Fns0Kp23cwKE9MufZD+jR9g=; b=ofJ2KXn8TeWQGXHqNNgWhcqrRYkGIIxw0hrm8qpHW5kjh11vRNd0auqmssfozWvIbx CMfWh7gNGRYVt4ir8/zVUqx+uaaKNHhKjR/OW73XgAyl+7Fuwn/LM/RnK+zxuMS3Y15/ yFG3SqmPpGyUw70ZBV/dbqKrxvtdCY6LuSXzMnrr8ZEgckq6PvH3x8IsHAkVd9Et1Lcv ZQKVAxp2iwQ29jv7UjLQEtC1UMqKBk3Zs/ZvUzaMmS729dM+dGjV4SC5/IfPQb5L4pUc eeoK1zb/8UH4GiRQmAZWZlDFO2ya+WlFxMmMTCYAwaYSmG/LpJEKHe4HrZqZVxPG+uHD M0Xw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Bw6mCLGv; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-89178-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-89178-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id c4-20020aa7c984000000b00564477609c3si1812903edt.378.2024.03.01.14.18.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 14:18:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-89178-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Bw6mCLGv; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-89178-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-89178-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 201F21F234E8 for ; Fri, 1 Mar 2024 22:18:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0793A5A4ED; Fri, 1 Mar 2024 22:17:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Bw6mCLGv" Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8C8575A11D; Fri, 1 Mar 2024 22:17:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709331462; cv=none; b=WlMBdkbPpUtXfLpE4oEyH0jgRqi6oc9ruvmrcLluGJKxAAP2fIxcBR7tF211+kftDmsmfhYjLqKq+ineeksxLunJ5ytY+86ktXqk2DnNy7L/V29VjkyDt4EJYI1E9ZPnZp3NHOAVyM9rkMlRZ0qKj4lKuYLzpyNoJsOhA1gN9wI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709331462; c=relaxed/simple; bh=JwjSgNGcouDuJW2a7u8TjPRSQvah6uYvnF4LKqBzFvU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=A6jsLgZIvhKh37dbnxXQo7C7LSNQBNFCR3WtkU59xNqkv6MiiH/VlSPrnpZHPE4+upjGmMUHseOhwg+AhepdEeaH3tO7WZQNE4XL8nkh4JePZ24v4VOAI4yMnBR71rE3Pwr5ePX5q5AI46rvfmPH5E15fo4dPcOT3y5lGxjyd7E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Bw6mCLGv; arc=none smtp.client-ip=209.85.218.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f49.google.com with SMTP id a640c23a62f3a-a446478b04bso267857966b.3; Fri, 01 Mar 2024 14:17:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709331458; x=1709936258; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Vz1OG2yxyOrvNMyrVQ5ZIeKhi3z1LeqYLOa11e4nui4=; b=Bw6mCLGvYO1GGZ0oIOvMW6LpN4ryvjiPr92curFHl8L2gMmLFDBTMb+ds7EisMRBLl GFSmGHWpxHzsCOTBa1e00qP9OVOtFq/DPOvj5J9bbaf6c4M6vTxMTMmf1+0hE1+aweTq uJSxUzB7Vp9cnnGVWpiuT18QXPgmvHpuQhjdzLIalnF3KWuhgJpIjijtnLcmn6WSE36R 2gSSzdTiyl2yvVYAv7f3xMFHB28ldLB7y5dzXQqd1zlcd56zHlAyCREY61UWykJUi7Gq D9otQwUk0nIeNTvwrP7WRctkrCwhIfDVU0CBrlFKHCI6fvdqwfevAAglfXj3+GZZrRBC HvEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709331458; x=1709936258; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Vz1OG2yxyOrvNMyrVQ5ZIeKhi3z1LeqYLOa11e4nui4=; b=ggItA67wMXmStY4cB2hIP8sjLo12DccCfqzrewKaoXtf0kAMN1vVB2nTy4yjV5leh5 LWI0whncKsgnGYqVudRyL0dKE95O6Nj+jFcOCP6u4BiW3i+kNGyH+nj3R1etR/u8inuI JgoQz1Od4Kq59y8paPYGoARGKVAlyk/My7Iws5I8te+B5izufpIiXfEexhWhI9/xgJ18 b81F/FoER4kR4i9B3r3LaT9M+tJmrbgPlgKwRVpnDzMM6PgXtia48o5V9ZGHnmV6udGZ gmTGbp/vq1vSprVbvMdodTBU4hToP49PZWTWC2E0+/M0yA95Ai37m8iE9YGcqLOMtx57 B4DA== X-Forwarded-Encrypted: i=1; AJvYcCW1PbY45spzrLfGOhfmJ/q68Ta3aDdMe4ylzVoLdBtHZNnD1KfLFBIZWOGqRH9in4Url+RYbEjX0zG7xHmh9jzE5kxKC91nv/ZDKWy/ X-Gm-Message-State: AOJu0Yy5npWqpPKtM16BbRyA7gOLNRaJAgtMw/NlebyJbaZkD+kjJXvw DBu5dvu3eyAxxMvzsMNSSTHLCzAwYQ6HrS+ZeGrnh6N4le/Vc8S9b3ZhNnXiPJo= X-Received: by 2002:a17:906:240a:b0:a44:2b1a:e257 with SMTP id z10-20020a170906240a00b00a442b1ae257mr2113326eja.55.1709331458353; Fri, 01 Mar 2024 14:17:38 -0800 (PST) Received: from WBEC325.dom.lan ([185.188.71.122]) by smtp.gmail.com with ESMTPSA id g16-20020a17090613d000b00a3f480154a3sm2091122ejc.65.2024.03.01.14.17.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 14:17:38 -0800 (PST) From: Pawel Dembicki To: netdev@vger.kernel.org Cc: Linus Walleij , Simon Horman , Pawel Dembicki , Russell King , Florian Fainelli , Vladimir Oltean , Andrew Lunn , Florian Fainelli , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Claudiu Manoil , Alexandre Belloni , UNGLinuxDriver@microchip.com, linux-kernel@vger.kernel.org Subject: [PATCH net-next v6 03/16] net: dsa: vsc73xx: use macros for rgmii recognition Date: Fri, 1 Mar 2024 23:16:25 +0100 Message-Id: <20240301221641.159542-4-paweldembicki@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240301221641.159542-1-paweldembicki@gmail.com> References: <20240301221641.159542-1-paweldembicki@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit It's preparation for future use. At this moment, the RGMII port is used only for a connection to the MAC interface, but in the future, someone could connect a PHY to it. Using the "phy_interface_mode_is_rgmii" macro allows for the proper recognition of all RGMII modes. Suggested-by: Russell King Signed-off-by: Pawel Dembicki Reviewed-by: Linus Walleij Reviewed-by: Florian Fainelli Reviewed-by: Vladimir Oltean --- v6: - resend only v5: - added 'Reviewed-by' only v4: - introduced patch drivers/net/dsa/vitesse-vsc73xx-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/dsa/vitesse-vsc73xx-core.c b/drivers/net/dsa/vitesse-vsc73xx-core.c index cb2e7e256279..8ed8fc997d6d 100644 --- a/drivers/net/dsa/vitesse-vsc73xx-core.c +++ b/drivers/net/dsa/vitesse-vsc73xx-core.c @@ -807,7 +807,7 @@ static void vsc73xx_phylink_mac_link_up(struct dsa_switch *ds, int port, else val = VSC73XX_MAC_CFG_TX_IPG_100_10M; - if (interface == PHY_INTERFACE_MODE_RGMII) + if (phy_interface_mode_is_rgmii(interface)) val |= VSC73XX_MAC_CFG_CLK_SEL_1000M; else val |= VSC73XX_MAC_CFG_CLK_SEL_EXT; -- 2.34.1