From: Wenyou Yang <hidden> Date: 2016-08-04 00:34:01
Disable all interrupts when suspend, they will be enabled
when resume. Otherwise, the suspend/resume process will be
blocked occasionally.
Signed-off-by: Wenyou Yang <redacted>
Acked-by: Nicolas Ferre <redacted>
---
drivers/net/phy/micrel.c | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
Disable all interrupts when suspend, they will be enabled
when resume. Otherwise, the suspend/resume process will be
blocked occasionally.
This seems like something fairly generic actually, we could imagine
having the core library do something like this:
- if interrupts are valid and enabled for the PHY, call
phydrv->config_intr() with PHY_INTERRUPT_DISABLED
- call genphy_suspend
Of course if none of this fits the generic model, the PHY driver can
still provide a suspend callback. Might be worth auditing other drivers
for that pattern and look at those that need specific handling like
keeping specific interrupt sources active for e.g: wake-on-LAN.
quoted hunk
Signed-off-by: Wenyou Yang <redacted>
Acked-by: Nicolas Ferre <redacted>
---
drivers/net/phy/micrel.c | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
-----Original Message-----
From: Florian Fainelli [mailto:f.fainelli@gmail.com]
Sent: 2016年8月4日 11:33
To: Wenyou Yang <redacted>
Cc: netdev@vger.kernel.org; linux-kernel@vger.kernel.org; linux-arm-
kernel@lists.infradead.org; Alexandre Belloni <alexandre.belloni@free-
electrons.com>; Nicolas Ferre [off-list ref]; Andrew Lunn
[off-list ref]
Subject: Re: [PATCH v1] net: phy: micrel: Add specific suspend
On 03/08/2016 17:21, Wenyou Yang wrote:
quoted
Disable all interrupts when suspend, they will be enabled when resume.
Otherwise, the suspend/resume process will be blocked occasionally.
This seems like something fairly generic actually, we could imagine having the
core library do something like this:
- if interrupts are valid and enabled for the PHY, call
phydrv->config_intr() with PHY_INTERRUPT_DISABLED
- call genphy_suspend
Accepted. I will send a new version.
Of course if none of this fits the generic model, the PHY driver can still provide a
suspend callback. Might be worth auditing other drivers for that pattern and look at
those that need specific handling like keeping specific interrupt sources active for
e.g: wake-on-LAN.
quoted
Signed-off-by: Wenyou Yang <redacted>
Acked-by: Nicolas Ferre <redacted>
---
drivers/net/phy/micrel.c | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index