From patchwork Sat Jul 16 14:29:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jamie Lentin X-Patchwork-Id: 9233219 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 157A26075E for ; Sat, 16 Jul 2016 14:32:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ED02222376 for ; Sat, 16 Jul 2016 14:31:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DC7282223E; Sat, 16 Jul 2016 14:31:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 161222223E for ; Sat, 16 Jul 2016 14:31:58 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bOQbV-0007zq-Oj; Sat, 16 Jul 2016 14:30:05 +0000 Received: from marmot.wormnet.eu ([2a03:9800:10:2d:3203:b3a5:8bdc:5b68]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bOQbQ-0007q6-8k for linux-arm-kernel@lists.infradead.org; Sat, 16 Jul 2016 14:30:01 +0000 Received: from mijo.vandergast.wormnet.eu ([80.229.158.163] helo=gonzo.vandergast.wormnet.eu) by marmot.wormnet.eu with esmtpa (Exim 4.86) (envelope-from ) id 1bOQat-0008IE-Kn; Sat, 16 Jul 2016 15:29:27 +0100 From: Jamie Lentin To: Jason Cooper , Andrew Lunn , Sebastian Hesselbarth , Gregory Clement , Imre Kaloz , Florian Fainelli Subject: [PATCH v0 09/10] net: phy: Re-attempt custom DT configuration after configuration Date: Sat, 16 Jul 2016 15:29:07 +0100 Message-Id: <1468679348-10522-10-git-send-email-jm@lentin.co.uk> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1468679348-10522-1-git-send-email-jm@lentin.co.uk> References: <1468679348-10522-1-git-send-email-jm@lentin.co.uk> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160716_073000_585830_2A7A3D8B X-CRM114-Status: UNSURE ( 6.86 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Jamie Lentin , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP marvell,reg-init is generally used to apply a custom LED configuration on boot. However this is then blatted in m88e1121_config_aneg when the interface is brought up. Re-apply any custom configuration afterwards, to keep custom LED configuration. Signed-off-by: Jamie Lentin --- drivers/net/phy/marvell.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c index c2ca347..b55e4e0 100644 --- a/drivers/net/phy/marvell.c +++ b/drivers/net/phy/marvell.c @@ -424,6 +424,10 @@ static int m88e1121_config_aneg(struct phy_device *phydev) phy_write(phydev, MII_MARVELL_PHY_PAGE, oldpage); err = genphy_config_aneg(phydev); + if (err < 0) + return err; + + err = marvell_of_reg_init(phydev); return err; }