From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81BBDC43460 for ; Mon, 12 Apr 2021 14:30:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 62AC56134F for ; Mon, 12 Apr 2021 14:30:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242309AbhDLOa3 (ORCPT ); Mon, 12 Apr 2021 10:30:29 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:45578 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242263AbhDLOaY (ORCPT ); Mon, 12 Apr 2021 10:30:24 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1lVxZj-00GHBk-33; Mon, 12 Apr 2021 16:30:03 +0200 Date: Mon, 12 Apr 2021 16:30:03 +0200 From: Andrew Lunn To: Pali =?iso-8859-1?Q?Roh=E1r?= Cc: Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Jakub Kicinski , Marek =?iso-8859-1?Q?Beh=FAn?= , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: phy: marvell: fix detection of PHY on Topaz switches Message-ID: References: <20210412121430.20898-1-pali@kernel.org> <20210412133447.fyqkavrs5r5wbino@pali> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210412133447.fyqkavrs5r5wbino@pali> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > > +/* This table contains representative model for every family */ > > > +static const enum mv88e6xxx_model family_model_table[] = { > > > + [MV88E6XXX_FAMILY_6095] = MV88E6095, > > > + [MV88E6XXX_FAMILY_6097] = MV88E6097, > > > + [MV88E6XXX_FAMILY_6185] = MV88E6185, > > > + [MV88E6XXX_FAMILY_6250] = MV88E6250, > > > + [MV88E6XXX_FAMILY_6320] = MV88E6320, > > > + [MV88E6XXX_FAMILY_6341] = MV88E6341, > > > + [MV88E6XXX_FAMILY_6351] = MV88E6351, > > > + [MV88E6XXX_FAMILY_6352] = MV88E6352, > > > + [MV88E6XXX_FAMILY_6390] = MV88E6390, > > > +}; > > > > This table is wrong. MV88E6390 does not equal > > MV88E6XXX_PORT_SWITCH_ID_PROD_6390. MV88E6XXX_PORT_SWITCH_ID_PROD_6390 > > was chosen because it is already an MDIO device ID, in register 2 and > > 3. It probably will never clash with a real Marvell PHY ID. MV88E6390 > > is just a small integer, and there is a danger it will clash with a > > real PHY. > > So... how to solve this issue? What should be in the mapping table? You need to use MV88E6XXX_PORT_SWITCH_ID_PROD_6095, MV88E6XXX_PORT_SWITCH_ID_PROD_6097, ... MV88E6XXX_PORT_SWITCH_ID_PROD_6390, > > You cannot just replace the MARVELL_PHY_ID_88E6390. That will break > > the 6390! You need to add the new PHY for the 88E6341. > > I have not replaced anything. Yes, sorry. I read the diff wrong. Andrew