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.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS autolearn=ham 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 19644C43381 for ; Sat, 16 Feb 2019 19:31:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D7AD3222E0 for ; Sat, 16 Feb 2019 19:31:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732748AbfBPTb2 (ORCPT ); Sat, 16 Feb 2019 14:31:28 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45599 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728102AbfBPTb2 (ORCPT ); Sat, 16 Feb 2019 14:31:28 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1268787643; Sat, 16 Feb 2019 19:31:28 +0000 (UTC) Received: from localhost (ovpn-200-19.brq.redhat.com [10.40.200.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B0E05614C1; Sat, 16 Feb 2019 19:31:25 +0000 (UTC) Date: Sat, 16 Feb 2019 20:31:20 +0100 From: Stefano Brivio To: Heiner Kallweit Cc: Andrew Lunn , Florian Fainelli , David Miller , Russell King - ARM Linux , "netdev@vger.kernel.org" Subject: Re: [PATCH net-next 1/2] net: phy: disable aneg in genphy_c45_pma_setup_forced Message-ID: <20190216203120.06923d0c@redhat.com> In-Reply-To: <27bb134f-eb4e-e43a-5d9d-2c551a22428c@gmail.com> References: <8945c224-bfff-294d-f855-979016e077ec@gmail.com> <27bb134f-eb4e-e43a-5d9d-2c551a22428c@gmail.com> Organization: Red Hat MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Sat, 16 Feb 2019 19:31:28 +0000 (UTC) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi, On Sat, 16 Feb 2019 20:10:24 +0100 Heiner Kallweit wrote: > When genphy_c45_pma_setup_forced() is called the "aneg enabled" bit may > still be set, therefore clear it. This is also in line with what > genphy_setup_forced() does for Clause 22. > > Signed-off-by: Heiner Kallweit > --- > drivers/net/phy/phy-c45.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/net/phy/phy-c45.c b/drivers/net/phy/phy-c45.c > index bef126344..0374c50b1 100644 > --- a/drivers/net/phy/phy-c45.c > +++ b/drivers/net/phy/phy-c45.c > @@ -71,6 +71,10 @@ int genphy_c45_pma_setup_forced(struct phy_device *phydev) > return ret; > > return phy_write_mmd(phydev, MDIO_MMD_PMAPMD, MDIO_CTRL2, ctrl2); > + if (ret < 0) Perhaps you meant ret = phy_write_mmd(...)? > + return ret; > + > + return genphy_c45_an_disable_aneg(phydev); > } > EXPORT_SYMBOL_GPL(genphy_c45_pma_setup_forced); > -- Stefano