From: Heiner Kallweit <hkallweit1@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
David Miller <davem@davemloft.net>,
Russell King - ARM Linux <linux@armlinux.org.uk>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: [PATCH v2 net-next 2/2] net: phy: marvell10g: improve mv3310_config_aneg
Date: Sat, 16 Feb 2019 20:44:59 +0100 [thread overview]
Message-ID: <6827daf4-3ee0-c537-2b97-493bcc2a48ab@gmail.com> (raw)
In-Reply-To: <c029e3b6-5fbe-08fb-a012-90ceef3be100@gmail.com>
Now that genphy_c45_pma_setup_forced() makes sure the "aneg enabled"
bit is cleared, the call to genphy_c45_an_disable_aneg() isn't needed
any longer. And the code pattern is now the same as in
genphy_config_aneg().
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/net/phy/marvell10g.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/net/phy/marvell10g.c b/drivers/net/phy/marvell10g.c
index 496805c0d..4a6ae63ab 100644
--- a/drivers/net/phy/marvell10g.c
+++ b/drivers/net/phy/marvell10g.c
@@ -271,13 +271,8 @@ static int mv3310_config_aneg(struct phy_device *phydev)
/* We don't support manual MDI control */
phydev->mdix_ctrl = ETH_TP_MDI_AUTO;
- if (phydev->autoneg == AUTONEG_DISABLE) {
- ret = genphy_c45_pma_setup_forced(phydev);
- if (ret < 0)
- return ret;
-
- return genphy_c45_an_disable_aneg(phydev);
- }
+ if (phydev->autoneg == AUTONEG_DISABLE)
+ return genphy_c45_pma_setup_forced(phydev);
linkmode_and(phydev->advertising, phydev->advertising,
phydev->supported);
--
2.20.1
next prev parent reply other threads:[~2019-02-16 19:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-16 19:39 [PATCH v2 net-next 0/2] net: phy: disable aneg in genphy_c45_pma_setup_forced Heiner Kallweit
2019-02-16 19:44 ` [PATCH v2 net-next 1/2] " Heiner Kallweit
2019-02-17 2:37 ` Florian Fainelli
2019-02-16 19:44 ` Heiner Kallweit [this message]
2019-02-17 2:37 ` [PATCH v2 net-next 2/2] net: phy: marvell10g: improve mv3310_config_aneg Florian Fainelli
2019-02-21 4:19 ` [PATCH v2 net-next 0/2] net: phy: disable aneg in genphy_c45_pma_setup_forced David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6827daf4-3ee0-c537-2b97-493bcc2a48ab@gmail.com \
--to=hkallweit1@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).