Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp28272963rwd; Tue, 4 Jul 2023 16:35:36 -0700 (PDT) X-Google-Smtp-Source: APBJJlGBU1yFma/rfe9txb2AFeBuZn5oylRW7WoxZ8RWpZdYJOlKgL7bhuJu/z6PjJ52wnJN9byf X-Received: by 2002:a17:90a:1bc7:b0:263:34a:cb6f with SMTP id r7-20020a17090a1bc700b00263034acb6fmr15701859pjr.8.1688513736019; Tue, 04 Jul 2023 16:35:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688513736; cv=none; d=google.com; s=arc-20160816; b=e1Q6RrpeKIYZih7ZHamKxp6t7uIyB4TYGZfkkGytLRv2DVWiI+3ongHwVComMbKZoe vyxGT72uUTDATZJD3C/djpkQg+cIUbpXFDdJg5rtz0uoQPanyyp9GtNwdibCLMoZ/ZwY hiib6jPZLay9z5/knTlsvLQMWiv8m1qeEBD8bgPqO1gQ4H7cJdGEx9fW1XUWnfjIjiYl /Zubk79X0kl06ZCUZerUP7X3Rf2rN2EJ56wTKre3YO9REGrWvYya0PF5grE77eHzQrZh L2UIn2qfBiJm7kdtmzs7GwYHKnTMuROBogFoFwiWvqF1x3WTYGhRU0bRkT/4zgG51BES aRuQ== 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=FHRTeexmv1Ud/xXw29PxjXSkBNZLd2io9cIF6fc/k1c=; fh=uXzM6f2ruIIbdVB0rFa/N3lgVEoJPam3nUA0Zu4F+0s=; b=AY8DEPlAJftqY/taoLZfWb0EgTbtbZWqxTJzhuDVx9L6fQeAIneGCyIJayWCjoP6/B oToeBTfnkOukXUcxZLtu7dPJQUQOvdguT1gBFXzfKgCMOPjmeQTX/rpxvjeJeSKnfS1G MZD7b9GEu6R4r591J3qL0BVO2bMzz0+bibOlonu8olRHBi1vt0uysRkIuHHC1nYF6FCL mI2KjKhRLZuSvE3N52T8zwmxvpSamfDLfPtxsGTE2ZFUwSSK1y7/ay6pB/U4gCyxExSN NekgCyVtWBxoLRHAXDSdOQetAIwHY/XOn2TU9b4wg/f3FqUJWtBc0IxKuRMzMIaT0QtO kvLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=K7j0wGDm; 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 i16-20020a17090adc1000b00263c4af4d8csi304050pjv.121.2023.07.04.16.35.21; Tue, 04 Jul 2023 16:35:36 -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=K7j0wGDm; 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 S230232AbjGDXZK (ORCPT + 99 others); Tue, 4 Jul 2023 19:25:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229512AbjGDXZJ (ORCPT ); Tue, 4 Jul 2023 19:25:09 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF24110E2; Tue, 4 Jul 2023 16:25:07 -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=FHRTeexmv1Ud/xXw29PxjXSkBNZLd2io9cIF6fc/k1c=; b=K7j0wGDm0EZKlsvLg+BOfzNHcx 2LCYSmaTWfcakorPbX1G1B9OK87OmaZ4tHKStLSy3X/dP3LCJFW/sKN69dYfm3kI6EAlZANedx7ex 02MohdEiUMAlM9GvYK6K+HBwS6jPvv99YFs+PrPAMf5kQlKIA+ODyz2BYb9umejmZMDI=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1qGpO0-000ahY-GN; Wed, 05 Jul 2023 01:24:44 +0200 Date: Wed, 5 Jul 2023 01:24:44 +0200 From: Andrew Lunn To: Luo Jie Cc: hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 1/2] net: phy: at803x: support qca8081 1G chip type Message-ID: <66a5f898-e3fd-460a-b604-bb11a000e4e9@lunn.ch> References: <20230704090016.7757-1-quic_luoj@quicinc.com> <20230704090016.7757-2-quic_luoj@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230704090016.7757-2-quic_luoj@quicinc.com> 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,URIBL_BLOCKED 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 Tue, Jul 04, 2023 at 05:00:15PM +0800, Luo Jie wrote: > The qca8081 1G chip version does not support 2.5 capability, which > is distinguished from qca8081 2.5G chip according to the bit0 of > register mmd7.0x901d. > > The fast retrain and master slave seed configs are only needed when > the 2.5G capability is supported. > > Switch to use genphy_c45_pma_read_abilities for .get_features API. It is better to have lots of small patches, each doing one thing. If something regresses, a git bisect gives a much finer idea where the problem is. It is also easier to review small patches with good commit messages. So please break this patch up. > - /* Configure lower ramdom seed to make phy linked as slave mode */ > - ret = qca808x_phy_ms_random_seed_set(phydev); > - if (ret) > - return ret; > + /* Configure lower ramdom seed to make phy linked as slave mode */ > + ret = qca808x_phy_ms_random_seed_set(phydev); > + if (ret) > + return ret; Shouldn't this depend on how MDIO_MMD_AN, MDIO_AN_T1_ADV_L bit MDIO_AN_T1_ADV_M_MST is set? Maybe the user wants it to prefer master rather than slave? I know you are just trying to move code around, but it does seem like a good time to also improve the code. FYI: net-next is closed at the moment. Officially you should post as RFC, or wait until it opens again. Andrew