netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] r8169: Enable suspend when device is idle from boot.
@ 2011-12-29 18:33 Todd Broch
  2011-12-30 22:22 ` David Miller
  0 siblings, 1 reply; 8+ messages in thread
From: Todd Broch @ 2011-12-29 18:33 UTC (permalink / raw)
  To: nic_swsd; +Cc: Francois Romieu, netdev, Todd Broch

The r8169 driver supports power management and correctly transitions
from active to suspend when link transitions from connected to
disconnected.  However, if link is not connected at boot the device
remains active after the initial probe.

This change adds a check of the link status to the idle pm_op that
will schedule a suspend if inactive.

Signed-off-by: Todd Broch <tbroch@chromium.org>
---
 drivers/net/ethernet/realtek/r8169.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 67bf078..3dbb5fd 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -6137,6 +6137,7 @@ static int rtl8169_runtime_idle(struct device *device)
 	struct net_device *dev = pci_get_drvdata(pdev);
 	struct rtl8169_private *tp = netdev_priv(dev);
 
+	__rtl8169_check_link_status(dev, tp, tp->mmio_addr, true);
 	return tp->TxDescArray ? -EBUSY : 0;
 }
 
-- 
1.7.3.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-03-01 19:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-29 18:33 [PATCH] r8169: Enable suspend when device is idle from boot Todd Broch
2011-12-30 22:22 ` David Miller
2011-12-31 12:17   ` Francois Romieu
2011-12-31 17:46     ` David Miller
2012-01-03 23:30     ` Francois Romieu
2012-01-04 18:01       ` Olof Johansson
2012-01-04 22:07         ` Francois Romieu
     [not found]       ` <CA+iF6RocEBdXZh6LGW_Xak0Vxnzx6=AROvQJbF7sQzc7vYEb6A@mail.gmail.com>
2012-03-01 19:05         ` Francois Romieu

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).