From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ivan Khoronzhuk Subject: Re: Issue with commit fea23fb591cc "net: phy: convert read-modify-write to phy_modify()" Date: Fri, 5 Jan 2018 02:44:07 +0200 Message-ID: <20180105004405.GA20332@khorivan> References: <8cf4bdaa-bd05-1962-f1d0-6cb84db31588@googlemail.com> <20180104114439.GL28752@n2100.armlinux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Heiner Kallweit , Andrew Lunn , "David S. Miller" , "netdev@vger.kernel.org" To: Russell King - ARM Linux , Grygorii Strashko Return-path: Received: from mail-lf0-f45.google.com ([209.85.215.45]:39968 "EHLO mail-lf0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751155AbeAEAoL (ORCPT ); Thu, 4 Jan 2018 19:44:11 -0500 Received: by mail-lf0-f45.google.com with SMTP id u84so3554820lff.7 for ; Thu, 04 Jan 2018 16:44:10 -0800 (PST) Content-Disposition: inline In-Reply-To: <20180104114439.GL28752@n2100.armlinux.org.uk> Sender: netdev-owner@vger.kernel.org List-ID: + G.Strashko The below change also brokes phy connect for am572x.. int genphy_restart_aneg(struct phy_device *phydev) { - int ctl = phy_read(phydev, MII_BMCR); - - if (ctl < 0) - return ctl; - - ctl |= BMCR_ANENABLE | BMCR_ANRESTART; - /* Don't isolate the PHY if we're negotiating */ - ctl &= ~BMCR_ISOLATE; - - return phy_write(phydev, MII_BMCR, ctl); + return phy_modify(phydev, MII_BMCR, ~BMCR_ISOLATE, + BMCR_ANENABLE | BMCR_ANRESTART); -- Regards, Ivan Khoronzhuk