Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp771411rwp; Thu, 13 Jul 2023 00:11:30 -0700 (PDT) X-Google-Smtp-Source: APBJJlEPM2LWlZQuHP697R9+vgLKgeIepJO6qafISVW9iuIOtj4atl6Ag5Ijw6W9o53JSYXCDZPm X-Received: by 2002:a17:906:dfe4:b0:98e:1484:5954 with SMTP id lc4-20020a170906dfe400b0098e14845954mr649253ejc.71.1689232290000; Thu, 13 Jul 2023 00:11:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689232289; cv=none; d=google.com; s=arc-20160816; b=i/Wk43bKf51EETAWavh/pIYHBZtrPLd7UY8VZJivwpKoEqWgOlaai/T7ZnbP6mAuU1 jldImaT/OD3Z7LlftfCuPH1qtKTMN5JQu2nDzFihymU8OkpRhynpDAEmW7yhkYYdalSr 5C/bih4PppE+8/Cm6pjUfOvAxBXbigB1Z53Pw4mSyQVOZf81W0U7nlqbw3vVn7CZnj04 /YeBaRcrMq0HoHmdq4gJSrr8WEm98v0TasCxNrbUtn+e7VbWpvnBsPWBvdS0NjAPpl2O gIjAdbu1vvTK6LA9YRoFjAESDyNXLC39PkOfRKSrlp47LTElbavhNz93kwyo06gX8m2G jPXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=eQ/LFkDYElioH91NZhzdrHW+i+w8b59jw0PilkxQn5U=; fh=y6Nt63VVXY4On7n4MaqUr6QkIhGQzHbb1r/8aivKFpw=; b=QqLf7ZRKUN9mMlXkSUhEBDKce1MXZPVmMmHuNQz1EWdw/B2UUsLyyJ0FEzDaRxax0q /jWC93rA/LMCDGHlErSlyhXHUnmUXTVTyqQuhtc6sJnIcuRbhyHAGlL0ySXGWHg/FAHe otfNQ2K5pxEQtV075jHs/MwDWc+TB3vStztZ+ZUTkAaVZ84Isr0/Q/Vty3f7SvEcvtlM aXc3LmlIOT7Fi1izURKGbzevTWQPYAB2XZXeHRl9iZwJ9N6fv5ykblrZj0uLTrZPTwKy azRQq8lNEVtIeX1FoeJMeGff/I5ptUYdztj4+5oIvebSf37BbooSTQ+dZbhmDzH0LBhe x9mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b="lok/Ty9g"; 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=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k3-20020a1709063e0300b0098959daa36esi6399700eji.1022.2023.07.13.00.11.04; Thu, 13 Jul 2023 00:11:29 -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=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b="lok/Ty9g"; 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=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233917AbjGMHGj (ORCPT + 99 others); Thu, 13 Jul 2023 03:06:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233212AbjGMHGh (ORCPT ); Thu, 13 Jul 2023 03:06:37 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FD8E119; Thu, 13 Jul 2023 00:06:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=eQ/LFkDYElioH91NZhzdrHW+i+w8b59jw0PilkxQn5U=; b=lok/Ty9gc+9ceqLx7wvXtFv4rj NcCmCJexavQzqRQK1jk3M91UyOXRxJAb0t31cX5gxm9+VTka2hy5fwCxh+9Qs0XFK2G2hBbxShT53 1JiywOFMbtrTNXjEOy1slQBlPx0/HI+GLzjK9nosTOaESycmRTBqtKLvIMxzl0qKjfcwLspvQDnhD htd+j4B4ffQbhTi/TP+yiUK8VfC8IMr3KXkuQs2SYaGPICq4x/Na1ZIiceeB0wbtuvNADSzAVl6My gtENuGSPDHKsR+sLiwU67Abe+AN0ooXMTV2NGFV6utVKMcfcwJI+0V/FI4ks4yrIfb6kEbu4hmXaj x1YVl2ZA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:60704) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qJqPE-0005oa-06; Thu, 13 Jul 2023 08:06:28 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1qJqP6-0005us-Ga; Thu, 13 Jul 2023 08:06:20 +0100 Date: Thu, 13 Jul 2023 08:06:20 +0100 From: "Russell King (Oracle)" To: Daniel Golle Cc: netdev@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Felix Fietkau , John Crispin , Sean Wang , Mark Lee , Lorenzo Bianconi , Matthias Brugger , AngeloGioacchino Del Regno , =?iso-8859-1?Q?Bj=F8rn?= Mork , Florian Fainelli , Greg Ungerer Subject: Re: [PATCH v2 net-next 3/9] net: ethernet: mtk_eth_soc: add MTK_NETSYS_V1 capability bit Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Russell King (Oracle) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,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 Thu, Jul 13, 2023 at 03:18:23AM +0100, Daniel Golle wrote: > From: Lorenzo Bianconi > > Introduce MTK_NETSYS_V1 bit in the device capabilities for > MT7621/MT7622/MT7623/MT7628/MT7629 SoCs. > Use !MTK_NETSYS_V1 instead of MTK_NETSYS_V2 in the driver codebase. > This is a preliminary patch to introduce support for MT7988 SoC. Rather than using capability bits for versions, would it make more sense to use an integer for this, so you can do: if (eth->soc->netsys_version >= 2) { version 2 and later stuff } else { previous version stuff } ? I'm just thinking ahead to when we end up with stuff that v1 and v2 need but v3 and later don't. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!