]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
r8169: increase the delay parameter of pm_schedule_suspend
authorhayeswang <hayeswang@realtek.com>
Mon, 7 Nov 2011 20:44:37 +0000 (20:44 +0000)
committerJoe Jin <joe.jin@oracle.com>
Fri, 18 May 2012 02:32:43 +0000 (10:32 +0800)
The link down would occur when reseting PHY. And it would take about 2 ~ 5 seconds
from link down to link up. If the delay of pm_schedule_suspend is not long enough,
the device would enter runtime_suspend before link up. After link up, the device
would wake up and reset PHY again. Then, you would find the driver keep in a loop
of runtime_suspend and rumtime_resume.

(cherry picked from commit 10953db8e1a278742ef7e64a3d1491802bcfa98b)
Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
drivers/net/r8169.c

index 66d7123e7c0d75935ddfbdb1206d00596f0ffa89..fb2e76afc18292f073e3deb1bdc1d1942924ed5e 100644 (file)
@@ -1280,7 +1280,7 @@ static void __rtl8169_check_link_status(struct net_device *dev,
                netif_carrier_off(dev);
                netif_info(tp, ifdown, dev, "link down\n");
                if (pm)
-                       pm_schedule_suspend(&tp->pci_dev->dev, 100);
+                       pm_schedule_suspend(&tp->pci_dev->dev, 5000);
        }
        spin_unlock_irqrestore(&tp->lock, flags);
 }