Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2845740rwd; Mon, 22 May 2023 05:20:14 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5ewI5UO9lr2W6mE56d3NgYGQXGlIsnh+Iez3QXRXBp1CwpA1a6vuNwcuY8tss+g+gkPoAs X-Received: by 2002:a17:90b:238f:b0:24d:f77c:71e7 with SMTP id mr15-20020a17090b238f00b0024df77c71e7mr9574553pjb.41.1684758014398; Mon, 22 May 2023 05:20:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684758014; cv=none; d=google.com; s=arc-20160816; b=DKlzYqd4qfcZyLczdnWlqhc2InQeEbg9H9anJYKfm6QWAPgjj5tlh2MkULRm3cKoj4 KMZQW3FGHRilOUfWb3UijS4l3MgUjAjh+2UXyL4f6CNaZq5d7C/4Qeox8so+OW01R0wz GRVDWKyC1h3iXgplArj8bhghfmLqD7R+lXO8VxTiNnJ0l/I+Tuldegfg1rwJFqkEfTyw x92XVbPVXTTFQ55y1m6Idgr6L5dGjqV/epBh97gsX3D937DgcVG+U0PjKBaOu5nsIfVu +5tKUhgR5J7gLVHDoAPnf4rYe76s9gPgs/4293A0q3zu2OLw0Yav0Zq8cMiQvKDneYOI ApDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=BlebeOxwlkH4BlrTKG+sqIzxXmw3yFvwUw1o/jS7CVE=; b=vQlhGt5l8wZ9nKeLdTpXYAq2RX+9K0YEXrjTRWfc6fxBv+dQzA/trkuqpVXsHZHxc3 iajFE/OZfLjXkHVIhHTXOkStZRgbA2OOXNmxjWeNgKOzhPV1xTEpafkQbxCnb6qFZMIi WHszbUdbVga7yOkHNc4j4DKBdM9Isw0pijDgIEUD4wOSx/xfg6WABN6FXXn0l3jVUku/ 8IPWHq3n+/emnTm/NbrY2glZkxWE802qAXZNHn/JfBWk0eNQkhh3MqWmLQXsaKga1C0B Wq63x/KqFbEQC10/e04UG2dzJBTUFUPDEKdvUoFjjoGbdBLg1rwUwSbXJZIXDwrAtBmj Iq5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=CCUVOMg5; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v6-20020a17090abb8600b00246b1a9630csi2611257pjr.130.2023.05.22.05.19.59; Mon, 22 May 2023 05:20:14 -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; dkim=pass header.i=@gmail.com header.s=20221208 header.b=CCUVOMg5; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233885AbjEVMTR (ORCPT + 99 others); Mon, 22 May 2023 08:19:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233848AbjEVMR6 (ORCPT ); Mon, 22 May 2023 08:17:58 -0400 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D47391BF0; Mon, 22 May 2023 05:16:43 -0700 (PDT) Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-97000a039b2so112625466b.2; Mon, 22 May 2023 05:16:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684757797; x=1687349797; 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=BlebeOxwlkH4BlrTKG+sqIzxXmw3yFvwUw1o/jS7CVE=; b=CCUVOMg5NOmJkyahPTiVIE7b2Qz5Vgq/LKhxpQjav2u0Up8mDWWHYHm+0NgSpreCKY oioifpMAJWedSMwhbyN8jDY9pwgCJGnH7bd4Ygk8b7B9sVPqQtgkc2FCCPFUCBU57ary +4BzYdNeuugT1YdEpqBzFbrDvneFS0r+8lPnrweiTEtRITKC7oaLW6cyJ/kwD4d0HzgC bNmunD2PsgSccaF0Cl/J7t2B/8ePdkcZBMlRny2V4h2pjYpcAcI8C1aS3NKrJyG5TC9q oHAY46EJDa1qCxinrv+tmOSQv/ZrDGNbbRiVZERTjnAeTwNIDVNjrh2Adwcn4nkeV6Lw DZyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684757797; x=1687349797; 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=BlebeOxwlkH4BlrTKG+sqIzxXmw3yFvwUw1o/jS7CVE=; b=Lj6ELRdFI7pLiNIS+og3aCb6Z7xwuLNai2VwIGgxMXKfaJ1hshVzMr1L300rpZSt0H 3h1UyeU0MltKRFk84JPDkVY29ravElPFjPB5S6KMD7mJUwB9vlPNNdLkqIRvmn7FPxd5 eDk6J1pQALHg5ZEVJDM5cQ5FGehZGrz4HPoxLpQec6acOU+YlBOxEbPtRF9inxP4wREP UYUdNw+NLbCKD4EJpKKNbb7eqE2ClnxdpsBAOc/4dG28AdJhhQrnsROywxyRaKp5o2T4 ClEcvfMjt24IkDuMb+nvshWUJBrn6cAVit65m6vEw/tK1IkLWNi0waFa97QynEIAB9nR QXVA== X-Gm-Message-State: AC+VfDxSK9rrpZPrSpI+gWaWDy7v6gkUqEy+JPVmMUOle73qciGRwQzh 9UJ4p/U3xogELosCXyfwE8k= X-Received: by 2002:a17:907:7da7:b0:94e:fa56:a74f with SMTP id oz39-20020a1709077da700b0094efa56a74fmr10398638ejc.14.1684757796855; Mon, 22 May 2023 05:16:36 -0700 (PDT) Received: from arinc9-PC.. ([149.91.1.15]) by smtp.gmail.com with ESMTPSA id y26-20020a17090614da00b009659fed3612sm2999950ejc.24.2023.05.22.05.16.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 May 2023 05:16:36 -0700 (PDT) From: arinc9.unal@gmail.com X-Google-Original-From: arinc.unal@arinc9.com To: Sean Wang , Landen Chao , DENG Qingfang , Daniel Golle , Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , Russell King Cc: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= , Richard van Schagen , Richard van Schagen , Frank Wunderlich , Bartel Eerdekens , erkin.bozoglu@xeront.com, mithat.guner@xeront.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH net-next 17/30] net: dsa: mt7530: fix port capabilities for MT7988 Date: Mon, 22 May 2023 15:15:19 +0300 Message-Id: <20230522121532.86610-18-arinc.unal@arinc9.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230522121532.86610-1-arinc.unal@arinc9.com> References: <20230522121532.86610-1-arinc.unal@arinc9.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 From: Arınç ÜNAL On the switch on the MT7988 SoC, there are only 4 PHYs. That's port 0 to 3. Set the internal phy cases to '0 ... 3'. There's no need to clear the config->supported_interfaces bitmap before reporting the supported interfaces as all bits in the bitmap will already be initialized to zero when the phylink_config structure is allocated. There's no code that would change the bitmap beforehand. Remove it. Fixes: 110c18bfed41 ("net: dsa: mt7530: introduce driver for MT7988 built-in switch") Signed-off-by: Arınç ÜNAL Acked-by: Daniel Golle --- drivers/net/dsa/mt7530.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c index 514e82299537..f017cc028183 100644 --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c @@ -2533,10 +2533,8 @@ static void mt7531_mac_port_get_caps(struct dsa_switch *ds, int port, static void mt7988_mac_port_get_caps(struct dsa_switch *ds, int port, struct phylink_config *config) { - phy_interface_zero(config->supported_interfaces); - switch (port) { - case 0 ... 4: /* Internal phy */ + case 0 ... 3: /* Internal phy */ __set_bit(PHY_INTERFACE_MODE_INTERNAL, config->supported_interfaces); break; -- 2.39.2