blob: 6b312ff1def877776a9ee5bd6160bc3111d13a88 [file] [log] [blame]
From 484174272eed2d3902dfd218ab529d55189f3369 Mon Sep 17 00:00:00 2001
From: Ulf Hansson <>
Date: Thu, 27 Oct 2016 13:23:54 +0200
Subject: [PATCH 156/299] net: smsc911x: Synchronize the runtime PM status
during system suspend
The smsc911c driver puts its device into low power state when entering
system suspend. Although it doesn't update the device's runtime PM status
to RPM_SUSPENDED, which causes problems for a parent device.
In particular, when the runtime PM status of the parent is requested to be
updated to RPM_SUSPENDED, the runtime PM core prevent this, because it's
forbidden to runtime suspend a device, which has an active child.
Fix this by updating the runtime PM status of the smsc911x device to
RPM_SUSPENDED during system suspend. In system resume, let's reverse that
action by runtime resuming the device and thus also the parent.
Signed-off-by: Ulf Hansson <>
Tested-by: Geert Uytterhoeven <>
Signed-off-by: Rafael J. Wysocki <>
(cherry picked from commit 8812872960824681147fad051e6e1406fdfa07f9)
Signed-off-by: Simon Horman <>
drivers/net/ethernet/smsc/smsc911x.c | 6 ++++++
1 file changed, 6 insertions(+)
--- a/drivers/net/ethernet/smsc/smsc911x.c
+++ b/drivers/net/ethernet/smsc/smsc911x.c
@@ -2591,6 +2591,9 @@ static int smsc911x_suspend(struct devic
+ pm_runtime_disable(dev);
+ pm_runtime_set_suspended(dev);
return 0;
@@ -2600,6 +2603,9 @@ static int smsc911x_resume(struct device
struct smsc911x_data *pdata = netdev_priv(ndev);
unsigned int to = 100;
+ pm_runtime_enable(dev);
+ pm_runtime_resume(dev);
/* Note 3.11 from the datasheet:
* "When the LAN9220 is in a power saving state, a write of any
* data to the BYTE_TEST register will wake-up the device."