Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2497577rwd; Fri, 19 May 2023 06:36:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ50NprnAX312r5QrG80Ab7VgvXdMm8LkyzC4bRU/+nx8Xkrto2RPyPEx048xHcjdORnssUl X-Received: by 2002:a05:6a00:124d:b0:646:59e4:9514 with SMTP id u13-20020a056a00124d00b0064659e49514mr3478120pfi.7.1684503382288; Fri, 19 May 2023 06:36:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684503382; cv=none; d=google.com; s=arc-20160816; b=riKfs+iJFqgKQtlvsnE3190B2AbVo9TQrXjLMpmpX2LQbS67wrIQ8medT9Bfmi4X3k eWSsY49ENiZURgOpulA9E2xou5EP4HQ8kLpJwsrAeuq4WCAJa3dE4b1p6ZN31GKR4Qi5 I2sL6zHbjBEovxLaWGEL1CS7m5s465mtwitVIVudtDNJXVlrFmSwU/lVa1/L3scI57h+ 655OMsjQoyB3/Q3rFP9msV28BVw/Gb3q97HCIGuH8CK2Gt8m0U8WwP6XOmwiwPQs46IN 1hJnyl5NVvM/spZekIAOH+jraAd9TVSSbnCX7dUt9jC6R8zHUZIJw8JwDXQ7KegRXS7E GsJg== 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:subject:cc:to:from:date :dkim-signature; bh=FtuLYV/00lyausU8smcR6aXgjX8TjBffFwG+iqYFhSc=; b=BDFQYX/BHL9ozlng2QT2JyswHFPyulCnRV2yKePx0QyLWhz2VXiqxlmEAJ13NkauoD t4i9XvAEBgas0WXC47HZA1Sik0v0L3EtDgB1dft93zxvaFAwEaiT9Ys0kmxe5lq+yQm7 VrsPvkzbKeWEaggeL9VY6FwpffQhTLIgrUtj8Rt7z1Rjc57nUJPIoc9EK0WX05kT5wV7 1HP3f/e8AlrFTIAl0q2J/bMa91BW57F1Uu3eI85IyJ4xZ2EoUtrCgE9S3mPYF6hzkrFG HIfdxx2rQxKFE+HuQc/h/cKznNYBh6/QY9Qo1hwzIcDm0buCpsvlnD/6r7KiRStuXkhd Bq3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bAlM4vAn; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j71-20020a638b4a000000b005038290f44csi3678540pge.527.2023.05.19.06.36.06; Fri, 19 May 2023 06:36:22 -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=@kernel.org header.s=k20201202 header.b=bAlM4vAn; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231845AbjESNcq (ORCPT + 99 others); Fri, 19 May 2023 09:32:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231766AbjESNco (ORCPT ); Fri, 19 May 2023 09:32:44 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80ED5BB; Fri, 19 May 2023 06:32:43 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1546C65798; Fri, 19 May 2023 13:32:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 91D09C433A0; Fri, 19 May 2023 13:32:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684503162; bh=xr8dnZ6wHe0R/88tYpaF8vOYB3YN3mqfAzD/vFKAR3I=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=bAlM4vAnIqNSVyzHCy1wMsXKO0WGQuBY/9943JUkTLqtq/WxtRzO1TgPh5ntfkchW 7zVNwj7gV0DzvTMc5ipbo2zw5/dAGLauhwY4xtDHRZ3BgaaY8rves8deOV11Mrk7tw bDYSMlfRRIA3e/rE3tVGAX31fanRplzZm7a0wdp2k2T1EJ/7QfCPiINwvd0CrOfBE/ AwFLOOEb1NXe1p8BnR2Ho61Rr1Xj0CaXtlRjFqolJYpVPId1rUiFTS4ZE71/CDw0Xw p3B3G0/3KBZrh8aJ18NRDD9X12FQJXuks3qoEmL3pIaaDByjXuS6NF9v2kxu/Hjpm1 Y7SEjXUfmHsng== Date: Fri, 19 May 2023 15:32:33 +0200 From: Marek =?UTF-8?B?QmVow7pu?= To: Alexis =?UTF-8?B?TG90aG9yw6k=?= Cc: Andrew Lunn , 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 Subject: Re: [PATCH net-next 2/2] net: dsa: mv88e6xxx: enable support for 88E6361 switch Message-ID: <20230519153233.3fb8a4d1@thinkpad> In-Reply-To: <7419ffc0-b292-97c4-fee6-610a1a841265@bootlin.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> <7419ffc0-b292-97c4-fee6-610a1a841265@bootlin.com> X-Mailer: Claws Mail 4.1.0 (GTK 3.24.37; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 On Fri, 19 May 2023 15:16:57 +0200 Alexis Lothor=C3=A9 wrote: > On 5/19/23 14:38, Marek Beh=C3=BAn wrote: > > On Thu, 18 May 2023 14:58:00 +0200 > > Andrew Lunn wrote: > > =20 > >>>>> + [MV88E6361] =3D { > >>>>> + .prod_num =3D MV88E6XXX_PORT_SWITCH_ID_PROD_6361, > >>>>> + .family =3D MV88E6XXX_FAMILY_6393, > >>>>> + .name =3D "Marvell 88E6361", > >>>>> + .num_databases =3D 4096, > >>>>> + .num_macs =3D 16384, > >>>>> + .num_ports =3D 11, > >>>>> + /* Ports 1, 2 and 8 are not routed */ > >>>>> + .invalid_port_mask =3D BIT(1) | BIT(2) | BIT(8), > >>>>> + .num_internal_phys =3D 5, =20 > >>>> > >>>> 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? =20 > >>> > >>> 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 (w= rongly) > >>> that ports 0 to 4 have internal phys. =20 > >> > >> 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. =20 > >=20 > > Why would port 0 be broken on 6393x ? =20 > 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 ther= e is no > internal phy for port 0 on 6393X ? OK that's true :)