Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp983590rwd; Thu, 18 May 2023 06:35:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Oz4EOjTmC8XwSWwWAsNaPT2X7lqPIh8nQqGCiWUkys5Z50ewf2oMTizXWB7LqtLG2H3uF X-Received: by 2002:a05:6a00:24d3:b0:63b:8eeb:77b8 with SMTP id d19-20020a056a0024d300b0063b8eeb77b8mr5007134pfv.13.1684416926296; Thu, 18 May 2023 06:35:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684416926; cv=none; d=google.com; s=arc-20160816; b=KxPtxHZfLsdmmwb+n9EJ475FsMQtT8oSLC0qf5ot3Mv3Jruw7aScrTt4dtDHSBlbDz GQfSdqow7sxQu8sh35SvMTOJkR1JwNXysszzd7WYZX6JsOwUf+9ORMY6w7gjhWOnkf3p bkdWy0RNzI9lovOFaXFUt59/lrIbjvqjN8l+cBPRAEKTREKr6YNc2gqeMTyIemHX1Nxy A27WmgnMMXG/oPP02gMkzcxovNYcrn2Um/0Sf6jNDiz6MI9OWlleUYYvC2pnYWWM97dI VZL7mVzcXpl8Pyh0z7ZQml9z/X8SNzOxhucL1bCP3lHeGcw45ksqOoBjE1w0N/o5KnGk gZfQ== 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:dkim-signature; bh=ornDW2gcGC07DEWBDSLBzCZabH8SWvpEcRaK0EXRMog=; b=c1DtFcx0POfHDcjeS7LM4sc7c+7lkiiIb82aQyUbGbxQ+Nx6sZIGpANF3pyPasra6C iQpEHTBjgOP13eAPpQe8U59Qzc3AeMMJovSdXqt4/aFWuXkA3ZYqFwfDSY3fzjXqK2jJ /hkONOPdHnAOlCblKyDQBpzAhZhDIuGRvR2nW5JebXxZ/+B1qyk28nSo7HODDif3Bq52 wMsaqP4hBsOvAfyQgNkv1p5/+BclQEC2NAIcutjAV5McManF4aFDbLpqZC5XR4yhBPy9 jXeEcZFcM+sNcDxyryFTRkPehxk5GUc6zcrzjbZEolusfHKcNNUD+DZlvh/GxUOd+kZP GVmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=Yu2Xq+9d; 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=lunn.ch Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k1-20020aa79981000000b0064895928e06si1576110pfh.334.2023.05.18.06.35.11; Thu, 18 May 2023 06:35:26 -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=@lunn.ch header.s=20171124 header.b=Yu2Xq+9d; 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=lunn.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230411AbjERM6P (ORCPT + 99 others); Thu, 18 May 2023 08:58:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230144AbjERM6N (ORCPT ); Thu, 18 May 2023 08:58:13 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D6CA170B; Thu, 18 May 2023 05:58:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=ornDW2gcGC07DEWBDSLBzCZabH8SWvpEcRaK0EXRMog=; b=Yu2Xq+9dmo4vRz9ArK8Y0aKvaL kOjDPbXmtzz22cUPYu7iZ5LyX7KhUNjJcBTnBkt442tUyL0NNDA+q2nV65MmrEm81gT2gJ8WwoXKO hck1QEukCZESBxrVzW16DLk+8Bdwiy0AcZEq9OElCrqRMXXeOyS8iZXQXqc8O5o1YpxA=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1pzdCi-00DEDS-Ix; Thu, 18 May 2023 14:58:00 +0200 Date: Thu, 18 May 2023 14:58:00 +0200 From: Andrew Lunn To: Alexis =?iso-8859-1?Q?Lothor=E9?= 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 Subject: Re: [PATCH net-next 2/2] net: dsa: mv88e6xxx: enable support for 88E6361 switch Message-ID: <6643e099-7b72-4da2-aba1-521e1a4c961b@lunn.ch> References: <20230517203430.448705-1-alexis.lothore@bootlin.com> <20230517203430.448705-3-alexis.lothore@bootlin.com> <9a836863-c279-490f-a49a-de4db5de9fd4@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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 > >> + [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. Andrew --- pw-bot: cr