Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp838024rwl; Wed, 29 Mar 2023 09:05:47 -0700 (PDT) X-Google-Smtp-Source: AKy350ZYjB6cB3/y3UsPKuCUfHwtya8wUdAz9wq9BkXDdSfreE5vROF7t6V7burAmPMS4kKNrG+e X-Received: by 2002:a17:90a:4fc2:b0:23d:4242:a7a5 with SMTP id q60-20020a17090a4fc200b0023d4242a7a5mr22239717pjh.47.1680105947084; Wed, 29 Mar 2023 09:05:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680105947; cv=none; d=google.com; s=arc-20160816; b=iwdRhGQT0S91GsHuiRVqRYvyUFU7YvNGg40PfjEBTTrFVhG37/hIJAsMksJXu4TvQR luLJZT9oEI2S8PIAbIEaFMF3wTKcLpZtrNOYIaZp2Aqh+cDqGiQ1UEcZlCET7VnFE6g5 Yw6Fb3lmt7ekqsk0xYUE1FllEHVuwT4G4JTavLXSnv12O2vjtlBWaP9CljMo2pc815n3 DjpdQOPPCJzYcweGGd2Hov7C5cNqVqj9VJckZULsVb/4mb8aygG0RCMkBovdJWF/JhRv 4N+q1S0Sa8SU0qSQjtPTBkEe26LOQyFgbl4B8PfHz6HtXsAD7fTAa1qYxryccezPsbIw 93rA== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=EvX5AZmd4a7hpZVRfDvfVhXWm6XtqWCUdYcL19XDaQ8=; b=y/sXOYQ/B4epplEZxMrd9fvbpPZfJIwhyfy3pXIeZpoOHlmjzYM07/Fx/CLKB8h8k9 FtiUmPIpaAAB/nFwTomszh1wUbXufIHLYHk/x7AAiq7e7N0x9nxl5k+sMiisnfcfIBNK Xsy3i82hxj7EW2oXSqY1WBk8ANqWrpU7Td8DG0Adm8QGSdldsUgZ4qBPZ0+i5Qd6aBVS Un87UoZNccaLXQv8AdFAbf/c4ymmsAYiyuYzQnfR7pZMzoMrl1m4PJZtsjh4nAmqbxXv /4keEpkTd3Ov9OKGIJnq8/HTEmT5elL9IuedxuAqoHYY9ZzFpcIb8e43IeITch/YElqq J9Sw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c8-20020a17090a4d0800b00230da5c13e3si1700775pjg.43.2023.03.29.09.05.26; Wed, 29 Mar 2023 09:05:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230247AbjC2QCU (ORCPT + 99 others); Wed, 29 Mar 2023 12:02:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230180AbjC2QBx (ORCPT ); Wed, 29 Mar 2023 12:01:53 -0400 Received: from fudo.makrotopia.org (fudo.makrotopia.org [IPv6:2a07:2ec0:3002::71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B37A7693; Wed, 29 Mar 2023 09:00:39 -0700 (PDT) Received: from local by fudo.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96) (envelope-from ) id 1phYDp-0003Tk-2O; Wed, 29 Mar 2023 18:00:25 +0200 Date: Wed, 29 Mar 2023 17:00:21 +0100 From: Daniel Golle To: netdev@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , Sean Wang , Landen Chao , DENG Qingfang , Philipp Zabel Cc: Sam Shih , Lorenzo Bianconi , John Crispin , Felix Fietkau Subject: [RFC PATCH net-next v3 13/15] net: dsa: mt7530: add support for 10G link modes for CPU port Message-ID: <495231a9d84159878116c2cb181537da674edc27.1680105013.git.daniel@makrotopia.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=0.0 required=5.0 tests=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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The built-in switch of the MT7988 SoC is internally connected using a stateless 10G link. Add support for 10G interface modes to silence a warning otherwise occurring when the switch driver is setup. Signed-off-by: Daniel Golle --- drivers/net/dsa/mt7530.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c index fd55ddc2d1eb3..a4b49e5753bdc 100644 --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c @@ -2616,6 +2616,9 @@ mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode, case PHY_INTERFACE_MODE_1000BASEX: case PHY_INTERFACE_MODE_2500BASEX: /* handled in SGMII PCS driver */ + case PHY_INTERFACE_MODE_USXGMII: + case PHY_INTERFACE_MODE_10GKR: + /* internal stateless 10G link */ return 0; default: return -EINVAL; @@ -2739,7 +2742,9 @@ static void mt753x_phylink_mac_link_up(struct dsa_switch *ds, int port, * variants. */ if (interface == PHY_INTERFACE_MODE_TRGMII || - (phy_interface_mode_is_8023z(interface))) { + interface == PHY_INTERFACE_MODE_USXGMII || + interface == PHY_INTERFACE_MODE_10GKR || + phy_interface_mode_is_8023z(interface)) { speed = SPEED_1000; duplex = DUPLEX_FULL; } -- 2.39.2