Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2482351rwd; Fri, 19 May 2023 06:26:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5iA+JV0Eted0ZE0jSA9+puUWfUH+FPT53NU1OjMipV9uvlQZGsUOxXQ9+3xubqMc1t5HOy X-Received: by 2002:a17:90a:c7cf:b0:24d:f59a:d331 with SMTP id gf15-20020a17090ac7cf00b0024df59ad331mr2128728pjb.26.1684502803883; Fri, 19 May 2023 06:26:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684502803; cv=none; d=google.com; s=arc-20160816; b=R6MG+7ttrNo5s+om51MktTVHByX1wXxFgXp6+967mj49N0FUFE1pdScqKaTlGEF8tZ AWSOPKCnn8sH+dQWEZBYIHKGhoJW00soz1nazTNK6Vlof35kNqytKGm92taMVncU72U+ 54CSZTmxBS/1EzolJY7Xv5h+7iVQ8w8aeO3x1U2yEbeasNcTvhVoZDKpe9r4BFdQgiPS eB/9AYCd9qVcr50rJOvJMJ8fVje58Z1BxdbQbYaHAF7vlmHT+2eTHjpbvRPmohzb30D2 7TY6ndXxxFYwasyImT1CdxeYSjIZkkKEVBwlXXga6eqih8Ykr2cJSibNBBxbhSZ98llM aQvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=BMRHN6Y9kPqZOTRa6PWX6stTWQUsJnYXYUXm/l4rB2U=; b=S5rtxuF1y5LXUL6+ibqoTjusWCzF2irPb4K+NhSdnws86xl7Uw6QrPz3a+cXIapgS/ E3GMNdndannqGLcS+Lf1ZNhMO3hD/ChZbSln782DrdYyrwfIKdvArU+pNU4k8KUvkMso M8uslDsbyVJMtm1VBOmuu3VfJlQwEs2oWilmlIMmOuRsZ42XytcKmj5w4jmjMZ7kcjR3 SoV66Q3yTDerftAP3miYpZVMUmwKW4r9GHROnaYgLSDwG26GnfIJt+PWmYWtY3BqYY0e UhRMANManzSoCccJom4ndviP6ByjvjCfOSMNPezg4KugosYHOtv+gdx3YqvaDnQWPev7 x+Lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=i6E1UvJw; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j6-20020a17090a94c600b0024bc03cfa95si1673311pjw.156.2023.05.19.06.26.25; Fri, 19 May 2023 06:26:43 -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=@bootlin.com header.s=gm1 header.b=i6E1UvJw; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231182AbjESNQs (ORCPT + 99 others); Fri, 19 May 2023 09:16:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229794AbjESNQq (ORCPT ); Fri, 19 May 2023 09:16:46 -0400 Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::221]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5848BD8; Fri, 19 May 2023 06:16:43 -0700 (PDT) Received: (Authenticated sender: alexis.lothore@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id EE0CE240003; Fri, 19 May 2023 13:16:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1684502201; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BMRHN6Y9kPqZOTRa6PWX6stTWQUsJnYXYUXm/l4rB2U=; b=i6E1UvJwyBnGESykQGwUgVfdIzCHSc8nEk+PZxzWIqrfHM7XdbeYJ2oXsoFnflBQCUmFIe kIiw69Y1pNuq0GnGM7kJovTQESmOI+R9M7swzDFfpn9mBTI1t2kwCqWRQyVRMCAcVFKN3D 5efkHEXc64VmpUda6WBRHl0bkzHcTGYUP68iF0QD789LsRTWpp+OroZWVaQuktDgeeRQbf gQRfE17KFrKM/OfA5kDQFpcPMf+qz5UG0w4tQ1peAyRCmP4X0u5jeqdsMT+IiEWbYoHRNm 5RHntfpzSWPDn6iZVtma2/YkdSEYav31sLCatplDvXRWPzvCiYxzuQ6HDtPA+A== Message-ID: <7419ffc0-b292-97c4-fee6-610a1a841265@bootlin.com> Date: Fri, 19 May 2023 15:16:57 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: [PATCH net-next 2/2] net: dsa: mv88e6xxx: enable support for 88E6361 switch Content-Language: en-US To: =?UTF-8?Q?Marek_Beh=c3=ban?= , Andrew Lunn Cc: Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, paul.arola@telus.com, scott.roberts@telus.com References: <20230517203430.448705-1-alexis.lothore@bootlin.com> <20230517203430.448705-3-alexis.lothore@bootlin.com> <9a836863-c279-490f-a49a-de4db5de9fd4@lunn.ch> <6643e099-7b72-4da2-aba1-521e1a4c961b@lunn.ch> <20230519143713.1ac9c7a1@thinkpad> From: =?UTF-8?Q?Alexis_Lothor=c3=a9?= In-Reply-To: <20230519143713.1ac9c7a1@thinkpad> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 On 5/19/23 14:38, Marek BehĂșn wrote: > On Thu, 18 May 2023 14:58:00 +0200 > Andrew Lunn wrote: > >>>>> + [MV88E6361] = { >>>>> + .prod_num = MV88E6XXX_PORT_SWITCH_ID_PROD_6361, >>>>> + .family = MV88E6XXX_FAMILY_6393, >>>>> + .name = "Marvell 88E6361", >>>>> + .num_databases = 4096, >>>>> + .num_macs = 16384, >>>>> + .num_ports = 11, >>>>> + /* Ports 1, 2 and 8 are not routed */ >>>>> + .invalid_port_mask = BIT(1) | BIT(2) | BIT(8), >>>>> + .num_internal_phys = 5, >>>> >>>> Which ports have internal PHYs? 2, 3, 4, 5, 6, 7 ? What does >>>> mv88e6xxx_phy_is_internal() return for these ports, and >>>> mv88e6xxx_get_capsmv88e6xxx_get_caps()? I'm wondering if you actually >>>> need to list 8 here? >>> >>> Indeed there is something wrong here too. I need to tune >>> mv88e6393x_phylink_get_caps to reflect 88E6361 differences. >>> >>> As stated above, port 3 to 7 are the ones with internal PHY. >>> For mv88e6xxx_phy_is_internal, I see that it is merely comparing the port index >>> to the number of internal phys, so in this case it would advertise (wrongly) >>> that ports 0 to 4 have internal phys. >> >> Ports 1 and 2 should hopefully be protected by the >> invalid_port_mask. It should not even be possible to create those >> ports. port 0 is interesting, and possibly currently broken on >> 6393. Please take a look at that. > > Why would port 0 be broken on 6393x ? By "broken", I guess Andrew means that if we feed port 0 to mv88e6xxx_phy_is_internal, it will return true, which is wrong since there is no internal phy for port 0 on 6393X ? > > Marek -- Alexis LothorĂ©, Bootlin Embedded Linux and Kernel engineering https://bootlin.com