Patchwork Bug#609538: r8169: long delay during resume

login
register
mail settings
Submitter françois romieu
Date Jan. 11, 2011, 8:28 p.m.
Message ID <20110111202817.GA2538@electric-eye.fr.zoreil.com>
Download mbox | patch
Permalink /patch/78429/
State RFC
Delegated to: David Miller
Headers show

Comments

françois romieu - Jan. 11, 2011, 8:28 p.m.
Jarek Kamiński <jarek@vilo.eu.org> :
[failure]

/me slaps head

Please check that it works if you add the patch below and I'll
merge both for a proper submission.

r8169: I am a clown.

Modifying rtl8169_reset_task() to tolerate firmware changes between
close() and open() but this is not high-priority.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>


> "r8169: delay phy init until device opens." alone also doesn't do the trick.

It was the expected behavior.

Patch

diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 7e2f01c..57fa6bd 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -3119,6 +3119,8 @@  static void __devexit rtl8169_remove_one(struct pci_dev *pdev)
 
 	cancel_delayed_work_sync(&tp->task);
 
+	rtl_release_firmware(tp);
+
 	unregister_netdev(dev);
 
 	if (pci_dev_run_wake(pdev))
@@ -4679,8 +4681,6 @@  static int rtl8169_close(struct net_device *dev)
 	tp->TxDescArray = NULL;
 	tp->RxDescArray = NULL;
 
-	rtl_release_firmware(tp);
-
 	pm_runtime_put_sync(&pdev->dev);
 
 	return 0;