net: jme: fix suspend/resume on JMC260
authorDiego Viola <diego.viola@gmail.com>
Tue, 23 Feb 2016 15:04:04 +0000 (12:04 -0300)
committerWilly Tarreau <w@1wt.eu>
Tue, 7 Jun 2016 08:42:48 +0000 (10:42 +0200)
commit ee50c130c82175eaa0820c96b6d3763928af2241 upstream.

The JMC260 network card fails to suspend/resume because the call to
jme_start_irq() was too early, moving the call to jme_start_irq() after
the call to jme_reset_link() makes it work.

Prior this change suspend/resume would fail unless /sys/power/pm_async=0
was explicitly specified.

Relevant bug report: https://bugzilla.kernel.org/show_bug.cgi?id=112351

Signed-off-by: Diego Viola <diego.viola@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/net/ethernet/jme.c

index 070a6f1a057745a803d3a6ccd6d8201644e95703..2f4cbcae9c7c25261874db69d16a67a960787d7c 100644 (file)
@@ -3290,13 +3290,14 @@ jme_resume(struct device *dev)
                jme_reset_phy_processor(jme);
        jme_phy_calibration(jme);
        jme_phy_setEA(jme);
-       jme_start_irq(jme);
        netif_device_attach(netdev);
 
        atomic_inc(&jme->link_changing);
 
        jme_reset_link(jme);
 
+       jme_start_irq(jme);
+
        return 0;
 }