From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752048AbcGPPDd (ORCPT ); Sat, 16 Jul 2016 11:03:33 -0400 Received: from marmot.wormnet.eu ([188.246.204.87]:50764 "EHLO marmot.wormnet.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751926AbcGPPD0 (ORCPT ); Sat, 16 Jul 2016 11:03:26 -0400 From: Jamie Lentin To: Jason Cooper , Andrew Lunn , Sebastian Hesselbarth , Gregory Clement , Imre Kaloz , Florian Fainelli Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jamie Lentin 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> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; } -- 2.8.1 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jamie Lentin 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> References: <1468679348-10522-1-git-send-email-jm@lentin.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: devicetree@vger.kernel.org, Jamie Lentin , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org To: Jason Cooper , Andrew Lunn , Sebastian Hesselbarth , Gregory Clement , Imre Kaloz , Florian Fainelli Return-path: In-Reply-To: <1468679348-10522-1-git-send-email-jm@lentin.co.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org List-Id: netdev.vger.kernel.org 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; } -- 2.8.1 From mboxrd@z Thu Jan 1 00:00:00 1970 From: jm@lentin.co.uk (Jamie Lentin) Date: Sat, 16 Jul 2016 15:29:07 +0100 Subject: [PATCH v0 09/10] net: phy: Re-attempt custom DT configuration after configuration In-Reply-To: <1468679348-10522-1-git-send-email-jm@lentin.co.uk> References: <1468679348-10522-1-git-send-email-jm@lentin.co.uk> Message-ID: <1468679348-10522-10-git-send-email-jm@lentin.co.uk> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 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; } -- 2.8.1