Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5EB6AC61DA4 for ; Fri, 3 Feb 2023 14:12:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233070AbjBCOMx (ORCPT ); Fri, 3 Feb 2023 09:12:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232866AbjBCOMV (ORCPT ); Fri, 3 Feb 2023 09:12:21 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5AD531715E; Fri, 3 Feb 2023 06:10:35 -0800 (PST) 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=IoWLxB7LOvb9BMVQQ87qnV7yd3Ao3ePV7KtRkjXCY+A=; b=czbrcrtsnqZ6XLdYJqaaQRQ5ad EeXobBKkj4MHQWXdz7wnozMEE/yhrDQBSMHABxQVj09BUoPe1IQIROJ9zY3yLQ1TTbKiooQeFE18z 3eOOKylMdavU3eFfZpv9EbarcnXiqbt1R4TWnVsz35CQJgQ1bupuaovf8BZ46Nt+8nEQ=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1pNwjs-0040RI-Mv; Fri, 03 Feb 2023 15:08:28 +0100 Date: Fri, 3 Feb 2023 15:08:28 +0100 From: Andrew Lunn To: Daniel Golle Cc: netdev@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Russell King , Heiner Kallweit , Lorenzo Bianconi , Mark Lee , John Crispin , Felix Fietkau , AngeloGioacchino Del Regno , Matthias Brugger , DENG Qingfang , Landen Chao , Sean Wang , Paolo Abeni , Jakub Kicinski , Eric Dumazet , "David S. Miller" , Vladimir Oltean , Florian Fainelli , Jianhui Zhao , =?iso-8859-1?Q?Bj=F8rn?= Mork Subject: Re: [PATCH 4/9] net: ethernet: mtk_eth_soc: only write values if needed Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 03, 2023 at 07:02:01AM +0000, Daniel Golle wrote: > Only restart auto-negotiation and write link timer if actually > necessary. > > Signed-off-by: Daniel Golle > --- > drivers/net/ethernet/mediatek/mtk_sgmii.c | 24 +++++++++++------------ > 1 file changed, 12 insertions(+), 12 deletions(-) > > diff --git a/drivers/net/ethernet/mediatek/mtk_sgmii.c b/drivers/net/ethernet/mediatek/mtk_sgmii.c > index f3cf66a23e72..58b5f2f70a66 100644 > --- a/drivers/net/ethernet/mediatek/mtk_sgmii.c > +++ b/drivers/net/ethernet/mediatek/mtk_sgmii.c > @@ -41,17 +41,13 @@ static int mtk_pcs_config(struct phylink_pcs *pcs, unsigned int mode, > struct mtk_pcs *mpcs = pcs_to_mtk_pcs(pcs); > unsigned int rgc3, sgm_mode, bmcr; > int advertise, link_timer; > - bool changed, use_an; > + bool mode_changed = false, changed, use_an; Reverse Christmas tree .... Please check all the patches. Andrew