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=-7.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 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 73230C433ED for ; Mon, 12 Apr 2021 15:52:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3B67961246 for ; Mon, 12 Apr 2021 15:52:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243156AbhDLPxD (ORCPT ); Mon, 12 Apr 2021 11:53:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:50416 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240489AbhDLPxC (ORCPT ); Mon, 12 Apr 2021 11:53:02 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C49006124C; Mon, 12 Apr 2021 15:52:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618242763; bh=APl4ltoCaeAX320Wz7C3DT47Uhr03SEhnnO+/Oi4vsY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hVbeTbsK+UPbYADeqoXS+4cks4edwWgjyPeTb08ATlCqepQSYtGWQRK81CnMkH3u4 01wTagc5WXzgVCmp+tUkYJjxJNSi6ZNDfuqQiFnCHHWq9XVwSOTA0On5DWYECxylrL f9WWEJr9TZ299jN8Wy0h5IIlio/FmSVFhGYT1HKJLzyEsYal7Q9xzPf88w+toDj7RE xrQrFZhkc+V0fcb66XSJkDm9IOgAkN3rR681o+zAr8oUW8I4/oJWT1AtHmFUyB34YH 9dLqx7LNqGkFbkiI8eiRcob8Ky0LPuNaYUXU37/VYxPg73c0Vai2rRKtR3Dor/CdJ2 /ok/JMy/HTgMg== Received: by pali.im (Postfix) id 28B38687; Mon, 12 Apr 2021 17:52:40 +0200 (CEST) Date: Mon, 12 Apr 2021 17:52:39 +0200 From: Pali =?utf-8?B?Um9ow6Fy?= To: Andrew Lunn Cc: Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Jakub Kicinski , Marek =?utf-8?B?QmVow7pu?= , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: phy: marvell: fix detection of PHY on Topaz switches Message-ID: <20210412155239.chgrne7uzvlrac2e@pali> References: <20210412121430.20898-1-pali@kernel.org> <20210412133447.fyqkavrs5r5wbino@pali> <20210412150152.pbz5zt7mu3aefbrx@pali> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Monday 12 April 2021 17:32:33 Andrew Lunn wrote: > > Anyway, now I'm looking at phy/marvell.c driver again and it supports > > only 88E6341 and 88E6390 families from whole 88E63xxx range. > > > > So do we need to define for now table for more than > > MV88E6XXX_FAMILY_6341 and MV88E6XXX_FAMILY_6390 entries? > > Probably not. I've no idea if the 6393 has an ID, so to be safe you > should add that. Assuming it has a family of its own. So what about just? if (reg == MII_PHYSID2 && !(val & 0x3f0)) { if (chip->info->family == MV88E6XXX_FAMILY_6341) val |= MV88E6XXX_PORT_SWITCH_ID_PROD_6341 >> 4; else if (chip->info->family == MV88E6XXX_FAMILY_6390) val |= MV88E6XXX_PORT_SWITCH_ID_PROD_6390 >> 4; }