From: Heiner Kallweit <hkallweit1@gmail.com>
To: Antoine Tenart <antoine.tenart@bootlin.com>,
davem@davemloft.net, linux@armlinux.org.uk, andrew@lunn.ch,
f.fainelli@gmail.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
thomas.petazzoni@bootlin.com, maxime.chevallier@bootlin.com,
gregory.clement@bootlin.com, miquel.raynal@bootlin.com,
nadavh@marvell.com, stefanc@marvell.com, mw@semihalf.com
Subject: Re: [PATCH net-next v3 1/2] net: phy: marvell10g: implement suspend/resume callbacks
Date: Fri, 29 Mar 2019 22:32:02 +0100 [thread overview]
Message-ID: <dcd7bdaa-5587-0099-3a2e-ce55b32ab7f9@gmail.com> (raw)
In-Reply-To: <20190326145302.9563-2-antoine.tenart@bootlin.com>
On 26.03.2019 15:53, Antoine Tenart wrote:
> This patch adds the suspend/resume callbacks for Marvell 10G PHYs. The
> three PCS (base-t, base-r and 1000base-x) are set in low power (the PCS
> are powered down) when the PHY isn't used.
>
> Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
> ---
> drivers/net/phy/marvell10g.c | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/drivers/net/phy/marvell10g.c b/drivers/net/phy/marvell10g.c
> index 100b401b1f4a..b56cd35182d5 100644
> --- a/drivers/net/phy/marvell10g.c
> +++ b/drivers/net/phy/marvell10g.c
> @@ -226,11 +226,25 @@ static int mv3310_probe(struct phy_device *phydev)
>
> static int mv3310_suspend(struct phy_device *phydev)
> {
> + phy_modify_mmd(phydev, MDIO_MMD_PCS, MV_PCS_BASE_T + MDIO_CTRL1,
> + MDIO_CTRL1_LPOWER, MDIO_CTRL1_LPOWER);
> + phy_modify_mmd(phydev, MDIO_MMD_PCS, MV_PCS_BASE_R + MDIO_CTRL1,
> + MDIO_CTRL1_LPOWER, MDIO_CTRL1_LPOWER);
> + phy_modify_mmd(phydev, MDIO_MMD_PCS, MV_PCS_1000BASEX + MDIO_CTRL1,
> + MDIO_CTRL1_LPOWER, MDIO_CTRL1_LPOWER);
> +
When you re-submit this series, in addition to my previous comment:
Instead of phy_modify_mmd() it would be clearer to use
phy_set/clear_bits_mmd(). And checking the return value wouldn't hurt.
> return 0;
> }
>
> static int mv3310_resume(struct phy_device *phydev)
> {
> + phy_modify_mmd(phydev, MDIO_MMD_PCS, MV_PCS_BASE_T + MDIO_CTRL1,
> + MDIO_CTRL1_LPOWER, 0);
> + phy_modify_mmd(phydev, MDIO_MMD_PCS, MV_PCS_BASE_R + MDIO_CTRL1,
> + MDIO_CTRL1_LPOWER, 0);
> + phy_modify_mmd(phydev, MDIO_MMD_PCS, MV_PCS_1000BASEX + MDIO_CTRL1,
> + MDIO_CTRL1_LPOWER, 0);
> +
> return mv3310_hwmon_config(phydev, true);
> }
>
>
next prev parent reply other threads:[~2019-03-29 21:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-26 14:53 [PATCH net-next v3 0/2] net: phy: marvell10g: implement suspend/resume callbacks Antoine Tenart
2019-03-26 14:53 ` [PATCH net-next v3 1/2] " Antoine Tenart
2019-03-26 18:43 ` Heiner Kallweit
2019-04-02 9:50 ` Antoine Tenart
2019-03-29 21:32 ` Heiner Kallweit [this message]
2019-04-02 9:50 ` Antoine Tenart
2019-03-26 14:53 ` [PATCH net-next v3 2/2] net: phy: marvell10g: add the suspend/resume callbacks for the 88x2210 Antoine Tenart
2019-03-29 17:57 ` [PATCH net-next v3 0/2] net: phy: marvell10g: implement suspend/resume callbacks 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=dcd7bdaa-5587-0099-3a2e-ce55b32ab7f9@gmail.com \
--to=hkallweit1@gmail.com \
--cc=andrew@lunn.ch \
--cc=antoine.tenart@bootlin.com \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=gregory.clement@bootlin.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=maxime.chevallier@bootlin.com \
--cc=miquel.raynal@bootlin.com \
--cc=mw@semihalf.com \
--cc=nadavh@marvell.com \
--cc=netdev@vger.kernel.org \
--cc=stefanc@marvell.com \
--cc=thomas.petazzoni@bootlin.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.