From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Nathan Sullivan <nathan.sullivan@ni.com>, f.fainelli@gmail.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] net/phy: micrel: Reenable interrupts during resume
Date: Thu, 30 Jul 2015 21:00:58 +0300 [thread overview]
Message-ID: <55BA665A.4080103@cogentembedded.com> (raw)
In-Reply-To: <1438269348-8725-1-git-send-email-nathan.sullivan@ni.com>
Hello.
On 07/30/2015 06:15 PM, Nathan Sullivan wrote:
> The ksz9031 has a behavior where it will clear the interrupt enable bits
> when leaving power down. To work around this, make sure the interrupt
> bits are in the state they are expected to be when resuming.
> Signed-off-by: Nathan Sullivan <nathan.sullivan@ni.com>
> ---
> Changes for V2: Actually make sure it compiles this time.
> ---
> drivers/net/phy/micrel.c | 18 +++++++++++++++++-
> 1 file changed, 17 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
> index 499185e..9774582 100644
> --- a/drivers/net/phy/micrel.c
> +++ b/drivers/net/phy/micrel.c
> @@ -447,6 +447,22 @@ static int ksz9031_center_flp_timing(struct phy_device *phydev)
> return genphy_restart_aneg(phydev);
> }
>
> +static int ksz9031_resume(struct phy_device *phydev)
> +{
> + int result;
> +
> + result = genphy_resume(phydev);
> +
I don't think empty line is needed here. Sorry for missing it in the first
posting...
> + if (result)
> + return result;
> +
> + /* This phy will reset interrupt enables when leaving power down */
> + if (PHY_INTERRUPT_ENABLED & phydev->interrupts)
> + result = kszphy_config_intr(phydev);
> +
> + return result;
> +}
> +
[...]
WBR, Sergei
prev parent reply other threads:[~2015-07-30 18:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-30 15:15 [PATCH v2] net/phy: micrel: Reenable interrupts during resume Nathan Sullivan
2015-07-30 16:40 ` Florian Fainelli
2015-07-30 17:00 ` David Miller
2015-07-30 23:09 ` Nathan Sullivan
2015-07-31 7:22 ` David Miller
2015-07-31 14:27 ` Nathan Sullivan
2015-07-31 20:21 ` David Miller
2015-07-30 18:00 ` Sergei Shtylyov [this message]
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=55BA665A.4080103@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=f.fainelli@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nathan.sullivan@ni.com \
--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).