Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp173308lqb; Tue, 16 Apr 2024 12:02:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUSJPgcy6GAIGE537XbiS8sQBZkke8W2oLFzV7tXwpf3gZi+0L6HnMKCYGx5w5NDaSGOj/fMDaWZBwtIb+ZZh1QKlMRqD0zikIwrbXQjA== X-Google-Smtp-Source: AGHT+IEtuoouMLejy0io6Xv6X6O68UJH1qxT+pYA7cM1dy3mu0CIJU8gXrpnsnbf2WWTv5Nr0gqF X-Received: by 2002:a17:906:888:b0:a52:f99:1930 with SMTP id n8-20020a170906088800b00a520f991930mr8283156eje.68.1713294159147; Tue, 16 Apr 2024 12:02:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713294159; cv=pass; d=google.com; s=arc-20160816; b=advmw8iKFgz2OEDipz4PZPAm4s2Fpm/43rorrkv/rEXD8+9/xngePgD1Ta75IYCxLS Rb2tojwOlfbgbdiVnr/SthKJtP16ZwblUnoku3wxJlqHurlVOdgAvGzk8w+r0bd1ahFH tTrxIpf/DmFJsNElSnAsRv2d8nJJhKRLyuB0EHdsZkd0STU241m15DZnL1o+6/f76qoX DR9dN6+YaS2lvcUxfTyVp7cp3zIu3hmDTAnVgKHVEyX6EkLFtep+wxkidAu7LDNcPqbJ 4EnIxikJKciL15+khVsXhXchoqBfRynRrgb3PLgIK7VV8Ev2bU+R3QTs6NlTgRR3NNHg dduA== 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=uY+yGYsg6qN0h3E2Q9QI5zY4qFMN3uFTB/yfBOf/FWE=; fh=G1Iht5Uvjt1deIz0NvHGntYQx1DNu7FuTHQrFGxjYF4=; b=pq9+0dDYo5rnek9n86SUSOaGEfkOhjIGYeKZBJOoflmKsSHW1/Osmz1pyHp99Xg7kf ADQyo/Z9DFBzc0QEqVzrkORYSKR5+NOl2elfxyBDwZFac4Ma/4k27yxis3O9o3PDjY7t l2Vn6A5StxYNGQ7VPE6GkTFB1grldcpjChpARETQWlqAT40aiY3TZZTKMloSGpCt0abW QJWDs/U3xwySmOYhUacO5lprMOmdzJpXQAE7VFk81WtPk9kCUH7X2V2rw27+OhlJdpPA yt5oUpQi2ploFh/T83L63tqHpaHfsqUjJDAyAeZQN88/4xSvKSQOcrpdHOMLiykh9APx 3I1w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=g1cy2K07; 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-147439-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-147439-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. [147.75.80.249]) by mx.google.com with ESMTPS id kv2-20020a17090778c200b00a4e7c56f6basi5916837ejc.600.2024.04.16.12.02.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 12:02:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-147439-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=g1cy2K07; 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-147439-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-147439-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 DA6971F22093 for ; Tue, 16 Apr 2024 19:02:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9ABE41384A8; Tue, 16 Apr 2024 19:01:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="g1cy2K07" Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) (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 26BBC137C4F; Tue, 16 Apr 2024 19:01:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713294114; cv=none; b=szFCGaRfOxjAfKozZEtIgCza75C9DrjOolA6VYqcBR0V6r+XnfFZUdE4HdJGD7TkF5/9t53UM2uHqZTmcxPnqhgG43Qv0x7I3ChD5b2ZpAUacKYXHURj6aOFszfp9Ex3OwVJQrx61bNrn8WqFCk9DluloJ8vsRacBhT0mSmFpow= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713294114; c=relaxed/simple; bh=eP76AH0to6uy37hdR0BpiHwMNRT3oXZ7/bfC04nZexc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=GIkUsRIm4RTgEv3VpE+p5Eby2o2Y6HH55LIwnS5iz+xuBBeCQK5pg8Sm6yczTixTe6KUNOEi4j5nQNOoGYVdjafkamRal7NsH+jsBH+C4ydCZ83u5VCmUZaw81Z2MoLgXXFLqZ0TsRxrGpNdaKDn9vezDLFvIhtzgB4V27OpzQw= 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=g1cy2K07; arc=none smtp.client-ip=209.85.218.52 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-f52.google.com with SMTP id a640c23a62f3a-a44ad785a44so579924266b.3; Tue, 16 Apr 2024 12:01:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713294111; x=1713898911; 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=uY+yGYsg6qN0h3E2Q9QI5zY4qFMN3uFTB/yfBOf/FWE=; b=g1cy2K077BpmWCSjLoc9h2W98TzgyZWoKJluQBdAL5xXQt1BDF/cr1KtyqDoLgyYqe 25XHgKXo52Ov2LGehZj1DhkXTwRyULYso1cyvgHfXgzeXCsEYSSAkEunkOGJpNTm4Ror TwfePA+d8j58nfVNeIWBahLcmXoRwkSVMT/HyrR1MT7KYvU1opO85QESycPR7akU3vcO hsEGxyl3bQKXAAWIbGMzmFObm6U83u4ayYjkdM3U3rwaJFjg+SBl9lTpFgd7YEVPATfW jkyuJgvYo5psxc0r1rljnMskVxyzrEsIdF9VoYdwtgJrKviw+x4HD4vfkB0Ar0vB7OVy EhcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713294111; x=1713898911; 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=uY+yGYsg6qN0h3E2Q9QI5zY4qFMN3uFTB/yfBOf/FWE=; b=EX3faaYSuL9baUwJ0pH9vONxjH+Bu9ihaBxmWR+DYGCseBsopPizk5h7gJvNLTA3n6 PKCFXGDkKfUKHzXxZuSNU1Lg0xKnnPCTqFf20MWY1HAt/JpOSUBXyFrpj2KmCxapfaVA brfnEw4Y/rQxchAPAgAoMCR0lVE7fItMhWP8h9JqdClVgFNLjm/RdwPCFbQ6LLUYgHHW fuxSq9EABv8EwmzToQKNlO8tCSPLaMecZ0jhoRMn2YamsT5S/qgA9AJwdZZAQ90OaPzz lRD5wtU2V2SDbIJOWiDq75FutGyt6dUH5hHbFjz7TjocRS1h1zQ7SvJlkI4385mWJTZ7 dtjA== X-Forwarded-Encrypted: i=1; AJvYcCXj+LCsMhXdzmQMrcafwTSGkCJQ14V7mWKUouJP5SddTbrOyfQoEYSee3KIFd9WpUe02jJste6BZTEjL3yH4EaOPOK40l7euTWlPNI8 X-Gm-Message-State: AOJu0YxS8pAp+Y68NIHCZgaBlRU4onWQWCIKhPuU8BvUFYYxAVFT4x5a 1Gm4i1k6emwVTBfQUQ3bAQu9kM21OCN2zuZE38Gz2vyVXJGrNW2g6MQdPgR5 X-Received: by 2002:a17:906:7145:b0:a52:8a8a:593a with SMTP id z5-20020a170906714500b00a528a8a593amr3393313ejj.2.1713294111183; Tue, 16 Apr 2024 12:01:51 -0700 (PDT) Received: from WBEC325.dom.lan ([185.188.71.122]) by smtp.gmail.com with ESMTPSA id mm10-20020a170906cc4a00b00a524531a580sm5247981ejb.152.2024.04.16.12.01.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 12:01:50 -0700 (PDT) From: Pawel Dembicki To: netdev@vger.kernel.org Cc: Pawel Dembicki , Russell King , Linus Walleij , Florian Fainelli , Vladimir Oltean , Andrew Lunn , Florian Fainelli , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Russell King , linux-kernel@vger.kernel.org Subject: [PATCH net-next 3/5] net: dsa: vsc73xx: use macros for rgmii recognition Date: Tue, 16 Apr 2024 21:00:53 +0200 Message-Id: <20240416190055.3277007-4-paweldembicki@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240416190055.3277007-1-paweldembicki@gmail.com> References: <20240416190055.3277007-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) Reviewed-by: Linus Walleij Reviewed-by: Florian Fainelli Reviewed-by: Vladimir Oltean Reviewed-by: Russell King (Oracle) Signed-off-by: Pawel Dembicki --- 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