All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 2.6.11] e1000: flush work queues on remove
@ 2005-03-21 20:02 John W. Linville
  0 siblings, 0 replies; only message in thread
From: John W. Linville @ 2005-03-21 20:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: cramerj, john.ronciak, ganesh.venkatesan, netdev, jgarzik

Flush work queues in ->remove() for e1000.

Acked-by: Ganesh Venkatesan <ganesh.venkatesan@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
Since e1000 is using work queues, we need to call
flush_scheduled_work() before removing the driver from memory.
Otherwise, we are prone to an Oops...

 drivers/net/e1000/e1000_main.c |    2 ++
 1 files changed, 2 insertions(+)

--- e1000-work-flush-2.6/drivers/net/e1000/e1000_main.c.orig	2005-03-17 21:37:30.000000000 -0500
+++ e1000-work-flush-2.6/drivers/net/e1000/e1000_main.c	2005-03-21 14:52:46.077220964 -0500
@@ -660,6 +660,8 @@ e1000_remove(struct pci_dev *pdev)
 	struct e1000_adapter *adapter = netdev->priv;
 	uint32_t manc;
 
+	flush_scheduled_work();
+
 	if(adapter->hw.mac_type >= e1000_82540 &&
 	   adapter->hw.media_type == e1000_media_type_copper) {
 		manc = E1000_READ_REG(&adapter->hw, MANC);
-- 
John W. Linville
linville@tuxdriver.com

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-03-21 20:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-21 20:02 [patch 2.6.11] e1000: flush work queues on remove John W. Linville

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.