Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2959121lqp; Mon, 25 Mar 2024 14:35:56 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXSXUksiYksR15a73QB+tCwrg2UIpznBSXlQomWz480H8X2cUIlwPG0YNNahRs5cFb04jHDX8asFXccKm17KzYek55a1XRpXQmi3OMdNQ== X-Google-Smtp-Source: AGHT+IFrj4W+NHdSW1S8TWudnTCK5OJFdg4gLQJggr91l/CQ1b8p4ktURs0RiJvA8Ba5N58w8pUE X-Received: by 2002:a17:90a:6983:b0:29f:ea48:25dd with SMTP id s3-20020a17090a698300b0029fea4825ddmr5861120pjj.33.1711402555734; Mon, 25 Mar 2024 14:35:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711402555; cv=pass; d=google.com; s=arc-20160816; b=FDXcOkQgfYNeRAT7nEvreQjkBpKuIbzcLF626QnimM8EbfYFHYFelSZhlChLXX9lBv 5oo7UPzYOBlFvQVY6hfjhLAVJSmRV/QVkj/hSFhczwa5dHShCFqJd/1X4idZ7DYn+xeI OPpAb0YBGUGnZ+rfezGtAs+nmxI+4WcmD51uYnR17SxR112E1Ue69nkElEGYWkWhjnZE DVYGZe+p5mD0G2I/95UUKMjCtZCOfTLxu6hDlNBIxiGmjx2lHUaae+qnx8gbSzphcbif 1mNFvmzDnb19gdm5b1NztJGjSfDKP533r/IaA0/5pQdz5eo5N2YH3UuvZohw2g1GwZQv hS+A== 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=upMc+uew/Oz20hh4qPvr2Qm02HG3vgIg6J6Sq4FrSK4=; fh=upn9z8qe0HBXA4twb2f/YOEJhbtpcOYnapmSVub+egs=; b=kfEN2Bi+6O7NxK7usLoFkdNzBEtzBeOqypTDuJXpL9h4jqxUq6MG4Rn4osm0/M2pg1 6sIb93osHnI4ckDINdamCmFeNiMwp41FSbYdc8GmBylr1+f9Y9gaQIGQMc8N7INrkeBj VkbUFTod/89Ca3RLrVd8/by2FrRzCtfLYhypJR73RqjWJ6TJvCpk3LOjCoLIdJJuDlvS 5vi7BxX6ISmxtnE2oHYE6yjbVZ/qtN3K+NjGhh1XOT+ZtKljOOsWRll8AOt9CYJOWk+m nNE+lB9DCh0tzpTm2fXu/6GvmnyRJFtnvUesaOHN2aXD74Fzcnim7y6b7xYjzPtDYtXo 1rbw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=N3z0KRCq; 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-117963-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117963-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id p8-20020a17090b010800b002a02bd053f4si8310988pjz.180.2024.03.25.14.35.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 14:35:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-117963-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=N3z0KRCq; 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-117963-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117963-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id DF61AB65505 for ; Mon, 25 Mar 2024 20:45:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 056D36DD0D; Mon, 25 Mar 2024 20:44:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="N3z0KRCq" Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) (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 5FB6A5B669; Mon, 25 Mar 2024 20:44:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711399488; cv=none; b=uw39/Jj33xx0Mt5s/jPGxDl6XpOgJsvX0vAvikEEIRMfKfQBRN4NmxwMlCx69hOyVOG4GGql6A7uIPCm8OoY5ViZdqxdMSQ9aj1cayvijdWJVfDT1dPhs+GM2FefFE94nFG2DR2Y4nqug/8Xa+LxRzm0alrelFPtENX/BYXjYYg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711399488; c=relaxed/simple; bh=V1fxWWUvpUniIImiS9q5KVpT11WA5yQQPruCDPMUSws=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Dha0aAb2KISMsFXuBNfi4VpWHRJya7KTEEL9WVetOYwvrQ7T+XpqAGp5gVbzSpBe8pi7NOQyUZE6TpKwq3HJyt/4cDkBrFxhrk63+f1+PCls5jSUdx4/CkrbK0ByKnNQBmgG30FNGIQB3JI639b7A9RoJAsSUNANlGAet2dKXbA= 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=N3z0KRCq; arc=none smtp.client-ip=209.85.167.54 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-lf1-f54.google.com with SMTP id 2adb3069b0e04-513e10a4083so5380057e87.1; Mon, 25 Mar 2024 13:44:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711399484; x=1712004284; 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=upMc+uew/Oz20hh4qPvr2Qm02HG3vgIg6J6Sq4FrSK4=; b=N3z0KRCqqUgPkwWsdzQ0F0ljSs48VgqoPkcTX+yC3ZzWHJbkBsDY4BesAosAGjpkzQ P8hHFX6902mP8V58dry+yuMJWLi6xoD9MzJK9mFT/eUyvLNHohyLn17iLqFw/6XGp+Up M8BhYOb/+3loJqoMlkTGXrL0qbV9b+dMAo+IBzUiixUzwnjHN77AmResyqXdHV8c9RgY eMG6HByOHjA8XNJE5eGCXwYpqDzwzNk8v3WMjiEIZRcGVhjFUOBWLvXeqBUrnVP2NuMc bhGot+iF4lEhvRLe8BX2eaUw6vOCLpqugrGr8AykRqiNe6gDhKNm3FxbiO0PghrIYP6o lqhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711399484; x=1712004284; 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=upMc+uew/Oz20hh4qPvr2Qm02HG3vgIg6J6Sq4FrSK4=; b=wKxFU6Zl35oLPHAK5hfAXqnIt6bOJtgYU+27KXv1s7xVETk8EMCDF6Bdoe1d8SAjUA 4N/PM86qVLTOSG/Weogqer5kRBxMTlCFHJVojSwVwmP4RDAWwGLfH77tR/WXBulhk/zQ u0h36Q6eGpGP70uoGlU4Fo9kxHUiyzLLcUi0CDk/mi4TEKaxtVpREkunSiEwWHOTHx5X Znh5bEPWMkgvJhgVVl8mByFP7FYZAhqXMZg82alado8ZSCO9huSjHNgCdHA7nrFQT+e8 FZyLXXGOWOI+53DbsT/s35aal4Uru9X0VFT/ynv4gAnZhoLtailnziUukzvzPYm2uuD7 +4Jg== X-Forwarded-Encrypted: i=1; AJvYcCV8b4HL77rZBHxfNmF6tVYjLXADBhBjRN5sQnT+xz+Mse3Ao/w4NeCJDlEtcrseBbPceYClP+UCClFwqebfvdwbP8TPyT3MrmIfe4WO X-Gm-Message-State: AOJu0YyrxhVVLbHFP/6p7jRK2rjncNfRXjJNCZhRJksfXAj4w5RKX+WR /9IwFoAX09utAdZXjThmzyuKJ+n6KLNZ9ViBipwt6MNKYt4xLrHvPbEzv2rwo/0= X-Received: by 2002:a19:5f08:0:b0:513:bea3:7f60 with SMTP id t8-20020a195f08000000b00513bea37f60mr4938304lfb.44.1711399483925; Mon, 25 Mar 2024 13:44:43 -0700 (PDT) Received: from WBEC325.dom.lan ([185.188.71.122]) by smtp.gmail.com with ESMTPSA id k18-20020a056402049200b0056c1cba8480sm591751edv.25.2024.03.25.13.44.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 13:44:43 -0700 (PDT) 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, Russell King , linux-kernel@vger.kernel.org Subject: [PATCH net-next v7 03/16] net: dsa: vsc73xx: use macros for rgmii recognition Date: Mon, 25 Mar 2024 21:43:28 +0100 Message-Id: <20240325204344.2298241-4-paweldembicki@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240325204344.2298241-1-paweldembicki@gmail.com> References: <20240325204344.2298241-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 (Oracle) Signed-off-by: Pawel Dembicki Reviewed-by: Linus Walleij Reviewed-by: Florian Fainelli Reviewed-by: Vladimir Oltean Reviewed-by: Russell King (Oracle) --- v7: - added 'Reviewed-by' and fix 'Suggested-by' in commit message 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