From: David Miller <davem@davemloft.net>
To: jszhang@marvell.com
Cc: thomas.petazzoni@free-electrons.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH net-next] net: mvneta: fix failed to suspend if WOL is enabled
Date: Mon, 17 Apr 2017 13:48:09 -0400 (EDT) [thread overview]
Message-ID: <20170417.134809.952428725665734201.davem@davemloft.net> (raw)
In-Reply-To: <20170414110732.3100-1-jszhang@marvell.com>
From: Jisheng Zhang <jszhang@marvell.com>
Date: Fri, 14 Apr 2017 19:07:32 +0800
> Recently, suspend/resume and WOL support are added into mvneta driver.
> If we enable WOL, then we get some error as below on Marvell BG4CT
> platforms during suspend:
>
> [ 184.149723] dpm_run_callback(): mdio_bus_suspend+0x0/0x50 returns -16
> [ 184.149727] PM: Device f7b62004.mdio-mi:00 failed to suspend: error -16
>
> -16 means -EBUSY, phy_suspend() will return -EBUSY if it finds the
> device has WOL enabled.
>
> We fix this issue by properly setting the netdev's power.can_wakeup
> and power.wakeup, i.e
>
> 1. in mvneta_mdio_probe(), call device_set_wakeup_capable() to set
> power.can_wakeup if the phy support WOL.
>
> 2. in mvneta_ethtool_set_wol(), call device_set_wakeup_enable() to
> set power.wakeup if WOL has been successfully enabled in phy.
>
> Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
Applied.
prev parent reply other threads:[~2017-04-17 17:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-14 11:07 Jisheng Zhang
2017-04-17 17:48 ` David Miller [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=20170417.134809.952428725665734201.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=jszhang@marvell.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=thomas.petazzoni@free-electrons.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®